system
Given the following post, respond as if you're commenting on Reddit:
human
Eli5 How does wind work?

As in the weather not the gas. Thank you!
gpt
In general terms different materials behave differently when the sun heats them up. Some reflects away most of the light, some absorb the light and release it as heat into the air and some slowly heats up and releases the heat to the air even long after the sun have gone down. This means that the air on the surface of the Earth gets heated unevenly. And when the air gets heated up it becomes less dense and floats up. This creates a low pressure region where surounding air that is cooler and therefore less dense will get pushed into to replace the hot air. And this movement of air from cold high pressure regions to hot low pressure regions is what causes the winds. Of course the real world is a lot more chaotic and there are lots of effects both on local and global levels which dominate the weather. But this is the basic principle.