Cascades to Coast

How does air stay on Earth, but not in space?

The reason why air stays on Earth, but not in space is the same reason why a ball thrown in the air comes back down to Earth and does not go off into space: gravity. All gases that make up the atmosphere, like the ball, have mass, and therefore "fall" towards the Earth because of gravity. However, all molecules in the air have some energy which depends on the temperature. Hydrogen molecules, which are the lightest, often get enough energy to escape Earth's gravity and go off into space. Planets with stronger gravity, like Jupiter, can hold on to even the hydrogen in their atmosphere. Small planets or moons may not have enough gravity to hold on to any gases.