Wind is formed by differences in atmospheric pressure and the Sun's uneven heating of the air that envelopes the Earth. When the air is warmed it rises, and the cooler air near the Earth's surface flows in to take its place.
This mechanism forms two types of circulation. One is the general circulation that takes place all over the Earth, and the other is a secondary circulation, which happens in smaller regions of high and low pressure. Winds that happen in only one place are called local winds.
General circulation produces prevailing winds. There are two belts of prevailing winds that are found at around 30 degrees north and south latitude. They're called trade winds because they were favorable for merchant vessels. They blow somewhat from east to west. There are no prevailing winds directly above the equator, because the air rises, and the winds are calm.
Secondary circulation forms inside of the general circulation. Air flows to low pressure areas, flowing away from high pressure areas. This causes the wind to move in a clockwise direction around a high pressure area and a counterclockwise direction around a low pressure area in the Northern Hemisphere. The situation is reversed in the Southern Hemisphere.