The Earth's atmosphere is made of layers of gases which are retained by the Earth's gravity. Some planets, such as Jupiter are among the “Gas Giants” which consist mainly of gases and thus, have very deep atmospheres. Earth contains roughly (by molar content/volume) 78% nitrogen, 20.95% oxygen, 0.93% argon, 0.038% carbon dioxide, trace amounts of other gases and a variable amount (average around 1%) of water vapour, together, it is commonly known as air. The density of air at sea level is about 1.2 kg/m3. This well-balanced composition protects life on Earth by absorbing ultraviolet solar radiation and reducing temperature extremes between day and night.
Atmospheric pressure is the force (per unit area) that is applied perpendicularly to a surface by the surrounding gas. It is determined by a planet's gravitational force and the total mass of a column of air above a location. Surface gravity, the force that holds down an atmosphere, differs significantly among the planets. The distance from the sun determines the energy available to heat atmospheric gas to the point where its molecules' thermal motion exceeds the planet's escape velocity, the speed at which gas molecules overcome a planet's gravitational grasp. Since a gas at any particular temperature will have molecules moving at a wide range of velocities, there will almost always be some slow leakage of gas into space. Earth's magnetic field helps to minimise this.