The gravitational attraction between the Earth and its atmosphere is greatest near the Earth’s surface. As a result, the density of air molecules is greatest near the Earth’s surface and decreases as the distance from Earth’s surface increases. The greater the density of air molecules the greater is their pressure.
Air pressure is greatest at Earth’s surface and decreases with altitude. This is why the air pressure is greatest at sea level but less in Denver, Colorado which has an altitude of 1.6 Km (1 mile).