The greenhouse effect is a natural warming process of the earth. When the sun's energy reaches the earth some of it is reflected back to space and the rest is absorbed. The absorbed energy warms the earth's surface which then emits heat energy back toward space as longwave radiation. This outgoing longwave radiation is partially trapped by greenhouse gases such as carbon dioxide, methane and water vapour which then radiate the energy in all directions, warming the earth's surface and atmosphere.
Greenhouse gases absorb solar energy and trap it in the atmosphere, just as glass panes trap heat in a greenhouse
The most abundant greenhouse gases in our atmosphere are carbon dioxide, methane, nitrous oxide and fluorinated gases