The ideal gas law is an excellent approximation of the behavior of many gases, including a lot of those in our atmosphere (Nitrogen, oxygen, water vapor, argon, carbon dioxide etc.)

The constant is called the Gas Constant and depends on the composition. At the same pressure, warm air is less dense than cold air.

Break down of ideal gas law P = pressure: units of Pascal (Pascal = N/m^2) = density: units of kg/m^3 = Mass/volume R = Gas constant = 287 T = temperature: units of Kelvin