The air pressure outside of your body changes as altitude changes. This creates a difference in pressure on the two sides of the eardrum. The result is a feeling of pressure and blockage in the ears.
High altitudes and blocked ears; Flying and blocked ears; Eustachian tube dysfunction -high altitude
Yawning or swallowing usually opens the Eustachian tube, which connects the middle ear to the nose. These movements allow the pressure to equalize in the ears. Performing them can unclog blocked ears when you are going up or coming down from high altitudes. Chewing gum the entire time you are changing altitudes helps by causing you to swallow frequently. This may prevent you from getting blocked ears in the first place.
People who always have blocked ears when flying may consider taking a decongestant about an hour before the flight leaves.
If your ears are blocked, try breathing in, then gently breathing out while holding your nostrils and mouth closed. If you do this too forcefully, you can cause ear infections by forcing bacteria into your ear canals. A perforation (hole) in your eardrum can result if you blow too hard. See: Barotrauma
O’Reilly RC, Sando I. Anatomy and physiology of the eustachian tube. In: Cummings CW, Flint PW, Haughey BH, et al, eds. Otolaryngology: Head & Neck Surgery. 5th ed. Philadelphia, Pa: Mosby Elsevier; 2010:chap 131.
Byyny RL, Shockley LW. Scuba diving and dysbarism. In: Marx JA, Hockberger RS, Walls RM, et al, eds. Rosen’s Emergency Medicine: Concepts and Clinical Practice. 7th ed. Philadelphia, Pa: Mosby Elsevier; 2009:chap 141.