Altitude affects climate in that the higher up you get, the more the temperature drops. The temperature goes down roughly 4 degrees Fahrenheit for every 1,000 feet you climb. Altitude is the subject's distance from the sea. This is why a lot of high-up places such as mountaintops often get snow for most of the year when other places do not, no matter how low the temperature drops.
The higher the pressure of any gas, such as air, the warmer it becomes. When pressure is relieved, the gas cools. On Earth, the air pressure is approximately 14.7 pounds per square inch at sea level. At about 50,000 feet above sea level, the air pressure is reduced to about 1.6 pounds per square inch. This means that in those areas, the temperature is extremely low.
Cooler temperatures in higher spaces translates to less evaporation and more moisture in the air; this is another reason why mountains have a lot of snowfall. Mountains sometimes prevent air from moving to other low areas due to their sheer size, meaning that the transportation of water is also limited. This can result in a very dry or desert-like climate in the lower regions. Often, two sides of the same mountain have different climates because of the water and air movement.