The pressure on the ears comes from the fact that there is a different pressure outside the ear and in the inner ear. This always happens when the external pressure changes fast. If you take the gondola up the mountain, the air pressure drops, and the outside pressure is less than the inside pressure of the ear. We feel pressure on our eardrum. If you would take the gondola straight back down to the valley, the outside pressure would adjust again, since the air pressure increases again as you travel down.
The ear can adjust internal and external pressure. This is done via the so-called ear trumpet. If you equalize the pressure, it opens, and the internal and external pressure can be equalized via a canal in connected to your mouth.
This is also the reason why extensive yawning after the cable car ride helps. This will open the auditory tube, too.
Watch the change in air pressure in an experiment!