Video answer: This is why cats bite you sometimes when you pet them
Top best answers to the question «Why do cats walk away when you pet them»
They're just trying to tell you they're wound up. A lot of cats get overstimulated by too much petting, or petting the wrong spot. Most cats respond best to face scritches, but see what works best for your cat. Watch their ears and tail.
She probably wants you to follow her because she wants to monopolize your attention. (Many cats don't like it when their humans pay attention to other things.) If you don't follow her and she still wants your attention, she'll eventually come back - or get bored and wander away.
Overstimulation can happen with any cat, but is especially something to watch for when you're just getting to know someone. If any of those things happen, stop petting! ... If the cat gets overstimulated enough to nip, remove your attention completely, either by walking away or by gently putting the cat off your lap.
Video answer: Cat 101: reasons why do cats bite