Wind is caused by heat from the sun. The different substances on the Earth's surface absorb heat differently, causing changes in pressure and the air in the atmosphere to move.
The Earth's surface consists of water and land, which absorb heat from the sun very differently. Land heats up much faster than water. When land heats up, it causes the air to heat up as well. The warm air rises and causes lower pressure. Cool air is much denser, which causes higher pressure. The air from areas with higher pressure moves into areas with lower pressure, and on a smaller scale, this can cause wind in areas close to water.
Global wind patterns work in a similar way. The sun heats the equator much more than it heats the North and South poles. Therefore, the air tends to rise around the equator and sink in polar regions, and air from the polar regions starts to move towards the equator. However, because the Earth rotates, the wind moves in a circular pattern. This is called the Coriolis force. Air rotates outward from high pressure zones towards low pressure zones. In turn, air rotates inward around low pressure zones.