The atmosphere protects Earth like a big blanket of insulation. It absorbs the heat from the Sun and keeps the heat inside the atmosphere helping the Earth to stay warm, called the Greenhouse
Greenhouse gases are certain gases in the atmosphere made up of water vapor , carbon dioxide , methane , ozone , nitrous oxide
Light from the sun passes through the atmosphere and is absorbed by the Earth's surface, warming it. Greenhouse gases, like carbon dioxide, act like a blanket, trapping heat near the surface and raising the temperature.