You may have noticed while going in an airplane, the temperature goes below -40 degree Celsius. The gases exhausted by the Jet engine contains the water molecules which get freeze at this temperature and get converted into small crystals.
Moving towards high altitude means you are approaching Sun. We know sun is too hot and if any object tries to go near it, it will get destroyed because of its intense heat. then why temperature decrease as we go up ?
When the radiation of sun is exposed to earth, most of the heat of sunlight is absorbed by the sea water and the remaining sunlight is absorbed by the earth. So the nearby place gets ho. But that heat is not due to the sunlight, actually it is because of the nearby objects too.
At high altitudes there is no any object that can absorb the heat. So, while going towards the high altitude, temperatures decreases instead of getting increased.