Your ears and altitude changes could cause a host of problems as the ear drum and middle ear are very sensitive to changes in atmospheric pressure. In order for the ear drum to vibrate most efficiently, air pressure on both sides of it should be the same. As atmospheric pressure changes, air pressure behind the ear drum (pressure in the middle ear) equilibrates to atmospheric air pressure by opening of the Eustachian tube which connects the middle ear space to the nasopharynx. This usually occurs unknowingly when you swallow.
During rapid changes in air pressure as in flying and scuba diving, the Eustachian tube may sometimes act as a one way valve allowing air to escape from the middle ear but not allowing air to get back in. When this happens, there can be sudden tension on the ear drum which can cause severe ear pain and rupture of the ear drum. A rapid change in middle ear pressure can also lead to a fluid buildup in the middle ear and even rupture of one of the delicate membranes that separate the middle ear from the inner ear.
In most cases, barometric trauma or barotrauma in the middle ear can be relieved by swallowing and trying to “pop” your ears. In severe cases or cases that do not respond to simple measures and last well beyond the time of the incident, you should seek medical attention. There are medications and procedures that can be used to alleviate the condition.