What I mean is that air molecules are energized by heat from the sun, which makes them pop up above ground level. Actually, the sun's rays don't heat the air very much in a direct way. The air is mostly warmed by heat radiated back from the land and sea. Anyway, the force of gravity keeps the lid on the little buggers as they zip about. The area in which these gases move is what we call our atmosphere.
Air surrounding the earth extends upwards hundreds of kilometers.
But air is heavy stuff, dude. At sea level, one cubic meter of air has a mass of about 1.25 kilograms. Like the water in a pond, air in the atmosphere exerts a pressure. We're usually not aware of air pressure because our bodies exert an opposite pressure that counterbalances it. A simple mercury barometer can measure this mysterious force.