We are all familiar with our ears popping when flying in an airplane, specifically when ascending or descending. The air in the ear canal and the air in the middle ear cavity, which is equal at rest, become vastly different as the plane rises or lowers. The Eustachian Tube which connects the middle ear cavity to the throat opens to equalize the pressure, but may not react quickly enough. Fullness and or pain can result, known medically as ear barotrauma, parotitis media, or aerotitis media. Barotrauma can also happen when in an elevator, driving in mountainous locations, or scuba diving. The eardrum can get sucked in until the Eustachian Tube opens, which can be facilitated by yawning or swallowing. Chewing gum or sucking on candy during take-off and landing can help keep the air pressure in the middle ear cavity equalized. Holding the nose closed and swallowing or blowing (Valsalva maneuver) also alleviates middle ear pressure build-up.
If discomfort, fullness or muffled hearing lasts more than a few days, or if you have symptoms such as severe pain, increased ear pressure, noticeable hearing loss, tinnitus (noises in the ears), vertigo (spinning), or ear bleeding consult with a physician. Flying with a cold can be extremely dangerous because when attempting to equalize middle ear pressure, congestion can fill up the middle ear cavity potentially causing an eardrum perforation. Consult with a physician if you need to fly with a cold.
Since a hearing aid fills up the ear canal, reducing the flow in the air into the ear canal, I recommend taking out your hearing aids while ascending or descending. Once up in the air, wearing them is fine.