The uneven heating of the Earth's surface creates hot and cold spots, creating the potential for convective currents. Air above a warm spot rises, creating a low pressure zone near the surface. Colder, denser air near the surface in a higher pressure zone then flows in, creating wind.
Heat's effect on the wind cycle is most easily observed near the sea. During the day, the ocean absorbs heat from the surface, keeping the air above it cooler than above the land. When the warm air rises from the shore, the cooler air from the ocean blows in to take its place. At night, the land cools quickly, while the ocean radiates the heat it absorbed, keeping the air above warm. This reverses the effect, causing the air offshore to rise and creating a breeze from the land. Uneven heating can also occur due geographical features. A mountainside exposed to the sun will warm more than a shadowed valley below it, creating a wind that blows uphill during the day and downhill at night.
The same principle is responsible for global wind patterns. The polar regions receive less solar radiation than areas near the equator, resulting in a global shift in temperature according to latitude. This, along with differences in temperature and density in various layers of the atmosphere, creates global wind patterns like the jet stream that help drive weather systems.