The mean temperature of our planet is fixed by steady state balance between the energy received from the Sun and an equal quantity of heat energy radiated back into space by the Earth. If disturbances in either incoming or outgoing energy is upset this balance, the average temperature of the Earth's surface will drift to a different steady state value. The resulting changes in the Earth's climate could upset food production, create deserts,raise the level of oceans or start a new ice age. One mechanism for resulting the Earth's temperature is the greenhouse effect.
Some of the things i am going to explain is going to be difficult but please bear with me.
The Sun emits radiation in a band of wavelengths from ultraviolet to infrared( UV to IR, 200nm to 3000nm) with a maximum in the visible spectrum at 500nm. This radiation passes through the atmosphere of the Earth with very little absorption. When this radiation reaches the Earth, it warms the ground or sea. The warm surface of the Earth radiates energy outwards at the longer infrared wavelengths. Unlike sunlight, infrared radiation cannot travel freely through air. Infrared radiation is absorbed by water vapour, carbon dioxide, ozone and other gases in the lower atmosphere , warming up the lower layers of the atmosphere, which radiate some heat back to the ground and some into space.
The warming effect of carbon dioixde and water vapour has been named the greenhouse effect. The effect is compared with the glass of a greenhouse, which lets sunlight enter and prevents infrared radiation from leaving. ( Actually in addition to reflecting infrared radiation , real greenhouses trap heat mainly by preventing warm air from escaping by convection.)
There is more water in the atmosphere than carbon dioxide, so most of the greenhouse effect is due to the presence of water vapour. The greenhouse effect is a natural phenomenon. Without it, the Earth would be uninhabitable. It is what keeps us from being a frozen planet. If gases such as carbon dioxide did not trap the Sun's energy , the Earth's mean temperature would be about -20 degree Celcius rather than its current 15 degree Celcius.
To be continued.......