Answer: The large amount of energy that comes from the sun heats up the Earth's surface and the air around it. As the air is heated up to a certian tempurature, it exapnds and density becomes a smaller amount. The warm and hot air begins to rise into the atmosphere and then the dense, cold air flows and/or sinks down to then replace the warmer air that is still rising.
Hope this helps you out! ☺