It was not until recent memory that what causes wind was understood. Wind is caused by air flowing from high pressure to low pressure. The Earth’s rotation prevents that flow from being direct, but deflects it side to side(right in the Northern Hemisphere and left in the Southern), so wind flows around the high and low pressure areas. This movement around is important for very large and long-lived pressure systems. For small, short-lived systems (outflow of a thunderstorm) the wind will flow directly from high pressure to low pressure.
The closer the high and low pressure areas are together, the stronger the pressure gradient, so the winds are stronger. On weather maps, lines of constant pressure are drawn(isobars). These isobars are usually labeled with their pressure value in millibars (mb). The closer these lines are together, the stronger the wind. The curvature of the isobars is also important to the wind speed. Given the same pressure gradient (isobar spacing), if the isobars are curved anticyclonically (around the high pressure ) the wind will be stronger. If the isobars are curved cyclonically (around the low pressure) the wind will be weaker.
Friction from the ground slows the wind down. During the day convective mixing minimizes this effect, but at night(when convective mixing has stopped) the surface wind can slow considerably, or even stop altogether.
Wind is one way that the atmosphere moves excess heat around. Directly and indirectly, wind forms for the primary purpose of helping to transport excess heat in one of two ways: away from the surface of the Earth or from warm regions(tropics) to cooler regions. This is done by extratropical cyclones, monsoons, trade winds, and hurricanes. Now, you have the answer to what causes wind and its primary function on our planet.
We have written many articles about the wind for Universe Today. Here’s an article about wind energy, and here’s an article about how wind power works.
We’ve also recorded an episode of Astronomy Cast all about planet Earth. Listen here, Episode 51: Earth.