The air pressure is based on three rules or laws which are Boyle’s law, Charles’ law and Avagadro’s law.
Explanation:
The pressure of air depends on temperature, volume and amount of gas particles. So, according to Boyle’s law, the pressure of air will be inversely proportional to volume occupied by the gas molecules at constant temperature.

And then the Charles’ law state that the air molecules occupying a volume depends on the temperature of the air molecules. In other words, volume occupied by gas is directly proportional to temperature at constant pressure and amount of air molecules.

And by Avagadro’s law, the volume of air is directly proportional to the amounts of air molecules in that volume.

So, these three rules decide the motion of gases.