The Sun heats the surface of the Earth unevenly, so that in some places it is warmer while in other places it is colder. Air closest to the Earth's surface is usually the warmest; air temperature drops as we rise through the troposphere, the lowest 10 to 12 km of the atmosphere. Warmer air close to the surface is lighter or less dense, so it rises. Conversely, as air cools, it becomes heavier, or more dense, and sinks. As warm air rises, air from cooler areas flows in to take the place of the heated air. This process is called convection and causes air to move. Such movement of air is commonly known as wind.
At the smallest scale, local winds like land and sea breezes are generated by differences in surface heating over only a few miles. Across areas perhaps several hundred miles in diameter, wind is sometimes seen to blow from high pressure to low pressure regions. Effectively, air is being pushed from one place to another. The differences in pressure are generated by temperatures contrasts caused by the unequal distribution of heat from the Sun. The wind however, does not blow in a straight line from high to low pressure. In fact it follows a much longer path spiraling out from a high pressure centre and spiraling in towards a low pressure centre. This is caused by the Coriolis force which results from the rotation of the Earth. Such wind is sometimes known as cyclonic wind.
At the global scale, the differential heating of the planet, with more sunlight received nearer the equator than nearer the poles, results in the temperature contrast across latitudes. This global temperature gradient is the driving force behind the major wind patterns we see on Earth. These winds are sometimes called the prevailing winds.