The planet Earth has an atmosphere, and it is segmented into layers.
The troposphere begins at the planet’s surface and extends between 6 (10 km) and 10 miles (16 km) high.
Above that, the stratosphere reaches 30 miles (50 km) from Earth’s surface.
The next 20 miles (33 km) is called the mesosphere, and after that comes the thermosphere, which stretches up 400 miles (600 km) into the atmosphere.
After the thermosphere comes outer space, which we call the exosphere.
The Earth’s atmosphere exists because the planet has a large enough mass to hold the gases in place via gravitational force.