A basketball is pumped up. When the needle is stuck into the basketball the air will automatically deflate the ball. While it took work to pump up the ball the air flows out effortlessly. The reason the air flows out of the basketball is due to the pressure gradient force. Air will flow from high pressure toward lower pressure until the pressures are equalized. In order words the flow is from excess pressure toward deficit pressure until the pressures are equalized. The pressure gradient force is the force produced when air with different pressures are placed next to each other.

Pressure differences occur in the atmosphere due to differences in the density of air. Warm air is less dense than cold air. The height of the atmosphere (thickness) is higher when the air is warm. As air warms the volume of the air increases and this causes an expansion of the air. Cooling air contracts. When warm air is placed next to cold air the density differences between the air masses sets up a pressure difference also.

Suppose you are at a height of 10,000 feet above the surface. When the air is warmer there will tend to be greater pressure than when the air is cold. When air is cold it is more dense and thus the air is more compacted. Since the air is more compacted there is less air up at the 10,000 foot level. When air masses are next to each other, as height increases, the warmer air will have a higher pressure compared to the cold air at the same elevation. This initiates a flow from the warm air toward the cold air. Weather conditions tend to be windy near frontal boundaries and where air masses are next to each other. Temperature differences in the atmosphere set the air in motion. This motion is a product of the pressure gradient force.