Head shaking almost always relates to a problem with the ears. and should always be seen by a veterinarian as a delay in treatment can result in permanent loss of hearing.
Aside from the risk of permanent hearing loss, most causes of head shaking relate to discomfort due to itching and inflammation. As your cat scratches his ears and shakes his head, he risks further aggravating the problem by inducing an ear hematoma, which is a blood-filled pocket caused by a broken blood vessel in the ear.
Ear mites - One of the most common causes of head shaking is due to ear mites. This tiny, spider like parasites live in the ear causing intense itching and discomfort to your cat. Typical symptoms include head shaking, a reddish/brown discharge from the ear, odour, coffee like grounds in the ear and bleeding.
Treatment of ear mites includes anti-parasitic medication to kill the mites, removal of the discharge and possibly steroids to reduce inflammation and antibiotics to treat secondary bacterial infection. All pet bedding should be washed at the same time.
Ear infection - Ear infections are usually bacterial but occasionally fungal. Usually, inflammation (due to other causes) leads to scratching, which can damage the delicate tissues of the ears and result in bacteria or yeast infected the damaged areas. Exacerbating factors can include hyperthyroidism, excessive production of ear wax, warm and humid conditions. Symptoms of ear infections include scratching, head shaking, unpleasant odour, ear discharge, redness, and inflammation.
Treatment of ear infections is antibiotic or anti-fungal medication.
Foreign object in the ear - Grass seeds or other material trapped in your cat's ear can result in an uncomfortable feeling leading to head shaking in an attempt to dislodge the offending item.
If you suspect your cat has a foreign object lodged in his ear, please take him to a veterinarian, poking around in the ears can result in permanent hearing loss. Removal of the object with forceps if it is within reach and/or rinsing out the ear (irrigation) with a saline solution are both effective in removing foreign objects. Antibiotic ointment will then be applied to the affected area.
Allergies - There are four types of allergies to affect cats, contact, inhalant, food and insect (especially fleas), most cat allergies manifest as intense itching, especially around the head and neck.
Treatment involves finding and removing the cause of the allergy if it can be figured out. Your veterinarian may be able to rule in and out possible causes based on the occurrence (is it seasonal or all year around), running food elimination trials and doing skin tests, which involves exposing your cat to multiple common allergens via a small prick to the skin and watching for a local reaction. Sometimes the cause can not be determined or eliminated (such as pollens). Antihistamines which reduce the allergic reaction along with steroids to reduce inflammation may be used.
Insect bites or stings - Most insect bites and stings occur on the face and paws of your cat, bee stings, and ant bites being the most common culprits. Some cats will have a localised reaction to the bite or sting resulting in itching, swelling and possibly head shaking.
Treatment is usually not necessary as the majority of insect bites and stings are harmless. Itching and swelling managed by either applying an ice pack, local steroids or administration of Benadryl (an antihistamine). In rare cases, your cat can have an anaphylactic reaction, which is a life-threatening allergic response. Urgent veterinary attention is needed to treat this.
Polyps - These are benign growths of the ear and nose arising from the mucous membranes. Symptoms can vary depending on the location of the polyps but may include coughing, sneezing, head tilt, drooping eyelid, ear infection, and nasal discharge.
Treatment is surgical removal of the polyps.