Ear injuries can occur when air pressure outside the ear increases or decreases while the air pressure inside the ear remains the same. This might happen when an airplane changes altitude or when a scuba diver descends or ascends under water.
A gradual increase in air pressure outside the ear can cause a buildup of fluid in the space behind the eardrum (otitis media with effusion).
A sudden, dramatic increase in air pressure outside the ear can cause the eardrum to rupture.
Both of these types of injuries are know as barotrauma.