Atmosphere is the layer of gases around a world that stays near it because of gravity, and the gas mix can change over time.
An atmosphere is the layer of gases that surrounds a planet, moon, or other space object and stays near it because of gravity. It often forms early when a world collects gas and ice or when gases come out from inside the planet.
Astronomers have found atmospheres around planets outside our Solar System, and even stars have outer layers called a stellar atmosphere. Objects like brown dwarfs or active comets can show gas around them too.
An atmosphere stays together because of hydrostatic equilibrium: tiny gas particles move and push outward as pressure, while gravity pulls them inward. This balance keeps the air from escaping or collapsing.
The troposphere is the lowest layer of air on rocky planets. Most of a planet’s air mass sits here, and it reaches about 17 km on Earth, 40 km on Mars, and 65 km on Venus; temperature usually falls with height here.
The stratosphere is the layer above the troposphere, where temperature rises with height on Earth. Earth's stratosphere holds the ozone layer (about 15–35 km), which absorbs some sunlight; Mars and Venus lack a strong ozone layer.
Gas giants are mainly made of hydrogen and helium, and because they are far from the Sun and very massive, they hold on to almost all their gas and lose almost no mass into space.