The earth is surrounded by layers of air called atmosphere. Air, just like everything else on the surface of the earth, is pulled by the gravitational force. Hence, air puts pressure on every surface it touches. The atmospheric pressure is the force exerted by air on any given surface as gravity pulls it towards the earth. The force per unit area is measured by an instrument called barometer (mercury or aneroid barometer) and hence atmospheric pressure is also termed as barometric pressure.
The atmosphere varies from place to place in terms of density of air, temperature and altitude. All these factors affect the atmospheric pressure i.e. the pressure exerted on a surface by the column of air above it.
Density of Air and Atmospheric Pressure
Air is densest at the surface of the earth because most of the molecules of air are pulled close to the surface by gravity. More gas particles in a given volume of air mean more pressure exerted by them on the given surface. So, atmospheric pressure is directly proportional to the density of air. A higher density of air means higher atmospheric pressure and vice versa.
Altitude and Atmospheric Pressure
As mentioned above, air is densest at the surface of the earth due to gravitational pull. Density of air decreases with an increase in altitude, finally leading to empty outer space. In addition to the density of air, the depth (distance from top to bottom) of the atmosphere also decreases with an increase in altitude. Hence, the atmospheric pressure is inversely proportional to altitude i.e. it decreases with an increase in altitude.
Sea level i.e. the base level for measuring elevation and depth of earth experiences the maximum atmospheric pressure as the density of air as well as the depth of atmosphere is maximum at this level.
Temperature and Atmospheric Pressure
The atmospheric pressure does not vary depending only on density and altitude but also on temperature. Temperature and atmospheric pressure are inversely proportional i.e. an increase in temperature results in a decrease in atmospheric pressure and vice versa. The air molecules, when heated, get kinetic energy and start moving away faster leading to a decrease in density of air at the given place. Lesser density further results in decreased atmospheric pressure.
In a nutshell, higher density, lower altitude and cooler temperature increase the atmospheric pressure and vice versa.