The atmosphere is composed of several layers - the troposphere, stratosphere, mesosphere, and thermosphere. Each layer varies in temperature and composition as altitude increases. The troposphere contains 75% of the atmosphere's mass and is where weather occurs. The stratosphere contains the ozone layer, which absorbs ultraviolet radiation and provides protection. Greenhouse gases like carbon dioxide and water vapor trap heat in the lower atmosphere, contributing to the greenhouse effect and global climate change.