The air high above the surface of the earth is less dense than near the surface, and as a result, its pressure is much lower than at the surface. So, the cabins airplanes are pressurized to prevent the pilot and passengers from passing out because of lack of air.
The pressure of air in the cabin is usually less than that of the air on the surface but more than outside air at high altitudes. As a plane rises the air pressure decreases and the air trapped in your inner ear will cause your ear drums to push outward causing some discomfort.
Your body equalizes the pressure between your inner ear and the atmosphere by allowing some air from your inner air to escape through to small channels called the Eustachian tubes that connect the inner ear to the throat one on each side. As the pressure is released you will hear a popping sound.