The atmosphere is the layer of gases surrounding our Earth and is responsible for providing us with oxygen, minimizing diurnal variations in temperature, absorbing harmful UV rays, etc. It is divided into 4 layers: the troposphere, stratosphere, mesosphere and thermosphere. The division is based on their temperature gradients. In other words, each layer has a different temperature gradient. The layer closest to us, the troposphere, has a negative temperature gradient. That is, the temperature falls as we go up. In the stratosphere, the layer through which airplanes fly, there is a positive gradient, meaning that the temperature rises as we go up. The mesosphere has a negative gradient, with a minimum temperature of as low as about -90 degrees Celsius. The topmost layer of our atmosphere, the thermosphere, is very hot (with temperatures reaching as high as about 2,000 degrees Celsius) and has a positive temperature gradient.
Hope this helps.