Some divers call it ear squeeze.
The pain occurs because of differences in pressure between the middle ear and the outside environment. The middle ear is an air-filled space formed by bone and the tympanic membrane or eardrum. It is connected to the throat by a tube called the eustachian tube. Air passing through the eustachian tube keeps the pressure in the middle ear equal to that of the outside world. If the eustachian tube malfunctions and a pressure difference occurs across the eardrum, pain or ear squeeze occurs.