In order to understand how the greenhouse effect operates, we need to first understand "infrared radiation". Greenhouse gases reduce the rate at which the Earth's surface loses infrared radiation to outer space. Because one way to increase the temperature of anything is to reduce its rate of energy loss to its surroundings, this makes the Earth's surface and lower atmosphere warmer than they would otherwise be.
What the Greenhouse Effect Isn't
Since there is considerable misunderstanding and misconceptions regarding the greenhouse effect, it is useful to list a few of the things the greenhouse effect is not:
1) The greenhouse effect does not operate like a greenhouse that plants are grown in. Plant
2) The greenhouse effect does not require solar radiation (sunlight) to operate. The greenhouse effect would still exist if there was no sun, and the climate system was instead warmed from below by geothermal energy.
3) The greenhouse effect cannot be demonstrated with a jar or other enclosure because there is too little greenhouse gas involved. Thousands of feet of atmospheric depth are required for the greenhouse effect to have a measurable effect on temperature.
The greenhouse effect is entirely due to the fact that the atmosphere absorbs and emits infrared energy, combined with a heat source to warm the bottom of the atmosphere (in our case, the Sun) and the cold depths of outer space above the top of the atmosphere. The greenhouse gases (and clouds) reduce the ability of the Earth's surface to cool, thus raising its temperature above what it would be without those greenhouse