The Earth's atmosphere contains certain chemicals that absorb infrared energy emitted by the Sun and Earth. The process by which
these chemicals absorb infrared energy is known as the carbon cycle or greenhouse effect or nitrogen cycle and is responsible for insulating or cooling the planet.
Examples of greenhouse gases in the atmosphere are carbon dioxide and methane. They trap infrared light spectrum emitted from the earth towards space. This trap acts as heat insulation causing global temperatures to rise and resulting in global warming and climate change.