The air pressure is different at different altitudes. The ear adjusts to the pressue by air moving in and out of the middle ear (through the eustacian tubes). This makes the pop!
There is air filled space inside our ears that is usually at the same pressure as air around us. However, when we change altitude the air pressure around us changes, but the air space inside our ears can’t change pressure easily as it is a confined space so the pop we get as we change altitude is when the difference in pressure is big enough to either force air out of the space in our ears as we increase altitude or force air into that space as we decrease altitude.
Comments