As you go up into the troposphere and inner stratosphere, it gets colder. When you reach the ozone layer, it warms up relatively despite it still being very cold. After this, you reach the mesosphere, which is extremely cold, and is the coldest layer of the atmosphere. After this, you enter the thermosphere, which is also relatively warm because of the ionosphere. The ionosphere is warm because of all the energy in the gamma rays that hit the ionosphere. Finally, the exosphere is relatively warm because of how spaced out the various molecules are. Keep in mind that relatively does not mean similar to the surface temperature. It means that it is hotter than the temperatures around it. The temp is constantly changing, it does not get hotter you absolute imbecile. Please castrate yourself so that you may never spread your seed unto a future generation.