Your ears "pop" as you drive up a mountain because the atmospheric pressure decreases as the altitude increases.
Your middle ear (behind the eardrum) is connected to the inside of your throat by your Eustachian tube
The Eustachian tube helps maintain equal pressure on each side of the eardrum by allowing outside air to enter or leave the middle ear.
When the outside air pressure decreases suddenly — for example, when you are driving up a mountain — air must move out of the middle ear to equalize the pressure on each side of the eardrum.
If the Eustachian tube is blocked or unable to respond fast enough, the air is trapped.
According to Boyle's Law, if the external pressure decreases, the volume of the air will increase.
The flexible eardrum will "pop" outwards in an attempt to decrease the pressure of the trapped air.