Ears pop to equalize the pressure between the outside of the ear and the inner ear. Unequal pressure can potentially lead to damage in the ear, along with general discomfort, so ear popping is the body's way of resolving the pressure difference before it becomes an issue. Ears can pop during radical changes in pressure, such as deep diving or ascending to altitude, and popping can also happen when people have colds and sinus infections.
Unequal pressure is caused by the presence of a barrier between the inner ear and the outside world. This barrier, the ear drum, is critical to the sense of hearing. However, it can create a situation in which the pressure on both sides of the ear drum is different. To equalize the pressure, the body can relieve or increase pressure with the use of the Eustachian Tubes, structures which run from the ears to the throat. Normally, these tubes are closed, but they open when the jaw is moved, promoting drainage and pressure equalization for the ears.
When pressure changes occur outside the ear, the ear drum becomes strained, bulging out or inwards, depending on which side is experiencing higher pressure. When the ear's owner moves his or her jaw, the Eustachian tubes, allowing the pressure to equalize and creating a small noise as the ears pop. Often, the popping is accompanied with a sense of relief, since the pain caused by the increased pressure is resolved.
Colds can cause ear popping because mucus secretions block the Eustachian tubes, making it difficult to normalize the pressure. When someone with a cold blows his or her nose, clearing the sinuses of mucus, the Eustachian tubes can open up so that the pressure will normalize and the ears pop. Incidentally, it is a very bad idea to pinch the nose shut and blow hard to pop ears if they are uncomfortable, because this can cause mucus to blow up the Eustachian tubes, causing an infection in the ear.
In the event that pressure differences do cause discomfort, there are some ways to encourage the ears to pop. Sometimes, yawning is enough, but opening the jaw wide and moving it around can also open up the Eustachian tubes. Some people like to chew on something like gum, using the movement of the jaw to make their ears pop. In the case of babies and young children who have difficulty understanding the source of the unpleasant sensation, using a children's toy designed for teething to encourage the child to move his or her jaw can help relieve the pressure.