A breakdown of Earth's atmospheric layers, including why it can get colder or hotter with altitude
Gases in the troposphere—the atmosphere's lowest layer—cool with increasing height as they get farther from the thermal energy emitted by Earth's warm surface. In the next layer—the stratosphere—ozone is increasingly heated by the sun's ultraviolet radiation with height. Because cooler air sinks and hotter air rises, the cooler troposphere and hotter stratosphere form a natural boundary keeping Earth's weather in the lowest layer.

