When sunlight strikes the Earth’s surface, some of it is reflected back towards space as infrared radiation. A greenhouse gas, which allows sunlight to enter the atmosphere freely, absorbs this infrared radiation and traps the heat in the atmosphere. Then, the amount of energy sent from the sun to the Earth’s surface should be about the same as the amount of energy radiated back into space, leaving the temperature of the Earth’s surface roughly constant.
Greenhouse effect keeps the temperature of the Earth higher than it actually is.
Water vapor, carbon dioxide, methane, and nitrous oxide are some of the natural gases that exhibit greenhouse properties.