The atmosphere is divided into four main layers - the troposphere, stratosphere, mesosphere, and thermosphere. The troposphere extends from the Earth's surface to around 12 km high, containing 80% of the atmosphere. Above this is the stratosphere, reaching 50 km high, where temperature increases with height due to ozone absorption of UV radiation. Next is the mesosphere from 50-80 km, the coldest layer. The outermost thermosphere extends from 80-320 km, with temperatures over 2000°C from absorption of UV and X-rays.