We sense the motion as wind. All of the energy to heat the air comes from the sun, but in general the sun heats the air indirectly. Solar radiation in the form of visible light penetrates our atmosphere and strikes Earth's surface, where it's converted into heat and, as described above, begins to rise. Instead, separate pockets of rising warm air masses called thermals are formed, ultimately driving the local wind directions. While small variations in Earth's surface help to cause localized wind conditions, differential heating and cooling of the atmosphere generates global-scale winds as well.
Hot air rising over the equator pushes northward and southward.
Upper atmosphere cooling causes the hot air masses to become more dense and sink. Once near the warm Earth, the air heats up and rises again. A vertically circling flow of air, called convection cells, results. The cyclic motion of these air masses is further modified by Earth's own rotation, deflecting them to the east and west. Known as the Coriolis effect, this rotation deflection is what gives rise to the global wind belts including the polar easterlies, mid-latitude westerlies, and tropical trade winds.