You may already know about the relationship between temperature and pressure: When you pressurize air (or any gas), it gets hotter, and when you release the pressure on air it gets colder. So a bicycle pump gets hot when you pump up a tire, and a spray paint can or a C02 cartridge gets cold as you release the pressurized gas. A refrigerator puts both of these processes together, pressurizing gas on the outside of the refrigerator to release heat and decompressing it inside the refrigerator to absorb heat (see How Refrigerators Work for details).

You may also know that air pressure decreases as altitude increases. This table shows the pressure (in pounds per square inch) at different altitudes:

Air Pressure
Sea level
14.7 PSI
10,000 feet
10.2 PSI
20,000 feet
6.4 PSI
30,000 feet
4.3 PSI
40,000 feet
2.7 PSI
50,000 feet
1.6 PSI

As air rises, the pressure decreases. It is this lower pressure at higher altitudes that causes the temperature to be colder on top of a mountain than at sea level.

These links will help you learn more: