Pets do a lot of weird things, and most of them have perfectly boring explanations. The head shake is one of the more entertaining ones, and the science behind it is actually pretty interesting—so here it is.Why cats do itCats shake their heads when the nerve endings on their heads get stimulated, according to Sarah Crowley, an anthrozoologist at the University of Exeter. “The physiological driver for it is stimulation of the very sensitive hairs and nerve endings around the top of the head, particularly around the ears,” she told Live Science.Turns out your cat’s nervous system is doing exactly what it’s supposed to. Crowley says the reflex comes from the highly sensitive hairs and nerve endings around the top of the head, especially near the ears—so when you nail that scratch, the cat’s body responds whether it wants to or not. Miele adds that touching a sensitive area around the ears or whiskers is a reliable trigger, and the rapid motion actually serves a purpose: it clears food or drink from the ears and whiskers and helps resettle the fur. “Often the head shake is followed by grooming of the face [or] ears,” Miele said.It can also mean your cat is annoyed with you specifically. Blowing in their ear tends to trigger it, which, for the record, you should not be doing. And the motion is fast enough that you might wonder if it causes dizziness—it doesn’t. Dogs shake differentlyIt’s not a cat-exclusive thing, either. Crowley says mice and rats show the same reflex after meals. For dogs, it largely comes down to ear shape—German shepherds and other upright-eared breeds shake more than their floppy-eared counterparts like King Charles spaniels, because open ears collect more debris.Then there’s the predatory shake, when your dog “kills” its toy by whipping its head back and forth with the thing locked in its mouth, and the full-body shake most pet owners know intimately from post-bath disasters. “It starts at the head and then rolls down the whole body and ends at the tail,” Crowley said.Drying off is only part of what the full-body shake is doing. Miele describes it as a way for animals to relieve tension and reset emotionally and physically after something stressful or exciting. “You often see both dogs will finish playing, and then they’ll both shake, and then they’ll go do something else,” Crowley added. It’s like a nervous system reboot. When to call your vetIf your pet starts shaking more frequently, in unusual contexts, or alongside scratching and head tilting, it could signal an infection, parasite, or something lodged in the ear. “It’s painful and uncomfortable, and that’s the only thing that they can do, apart from sticking their foot in it,” Crowley said.Miele warns that untreated ear infections can cause hearing loss and risk spreading past the eardrum into the middle ear, affecting balance and leaving the animal genuinely unwell. The head shake is almost always harmless. When it isn’t, your vet will know the difference.The post Why Your Dog or Cat Keeps Shaking Their Head (and When to Call the Vet) appeared first on VICE.