From high school geography class, you may remember that "air tends to flow from high pressure to low pressure". To understand why this happens, it is key to realize that gases (but also liquids) exert a force on their surroundings because of the thermal motion of the molecules. This force is in all directions, as the thermal motion is in all directions. The pressure ($$p$$) is simply the force ($$F$$) per unit area ($$A$$):

$p=\dfrac{F}{A} \label{2.1}$

For gases, there exists a very simple approximate relationship between the pressure, the density, and the temperature of the gas: the Ideal Gas Law. Although no such an elegant formula exists for liquids, the International Equation of State is used to relate the pressure, temperature, salinity (salt concentration), and density of sea water. If, for whatever cause (temperature, density, salinity), the pressure at one point in space is different than at a neighboring point, then there exists a pressure gradient. Now, consider a parcel of fluid with infinitesimal thickness $$dx$$ and surface area $$A$$ as depicted in the Figure below, where there is a horizontal pressure gradient ($$dp/dx$$), with a higher pressure on the right than on the left. The fluid on the right hand side of the parcel pushes the parcel to the left, whereas the fluid on the left hand side of the parcel pushes it to the right. Due to the pressure gradient, however, the push to the left is slightly harder than the push to the right. Thus, there is a net force on the parcel:

$F= A \times \left[ p_o - \left(p_o+dx \times \left(\dfrac{dp}{dx}\right) \right) \right] = -A \times dx \times \left( \dfrac{dp}{dx} \right) \tag{2.2}$

According to Newton's 2nd Law, the acceleration is:

$\dfrac{dv}{dt} =\dfrac{F}{m} \tag{2.3}$

and with $$m = \rho \times A \times dx$$, we finally obtain:

$\dfrac{dv}{dt} = - \dfrac{\left(\frac{dp}{dx}\right)}{\rho} \tag{2.4}$

The minus sign indicates that the acceleration is in the opposite direction of the pressure gradient, that is, "air tends to flow from high pressure to low pressure"; the magnitude of the acceleration is equal to the pressure gradient divided by the density of the fluid.