The greenhouse effect is a process by which thermal radiation from a planetary surface is absorbed by atmospheric greenhouse gases, and is re-radiated in all directions. Since part of this re-radiation is back towards the surface and the lower atmosphere, it results in an elevation of the average surface temperature above what it would be in the absence of the gases.
Solar radiation at the frequencies of visible light largely passes through the atmosphere to warm the planetary surface, which then emits this energy at the lower frequencies of infrared thermal radiation. Infrared radiation is absorbed by greenhouse gases, which in turn re-radiate much of the energy to the surface and lower atmosphere. The mechanism is named after the effect of solar radiation passing through glass and warming a greenhouse, but the way it retains heat is fundamentally different as a greenhouse works by reducing airflow, isolating the warm air inside the structure so that heat is not lost by convection.
The existence of the greenhouse effect was argued for by Joseph Fourier in 1824. The argument and the evidence was further strengthened by Claude Pouillet in 1827 and 1838, and reasoned from experimental observations by John Tyndall in 1859, and more fully quantified by Svante Arrhenius in 1896.
If an ideal thermally conductive blackbody was the same distance from the Sun as the Earth is, it would have a temperature of about 5.3 °C. However, since the Earth reflects about 30%  of the incoming sunlight, the planet’s effective temperature (the temperature of a blackbody that would emit the same amount of radiation) is about −18 °C, about 33°C below the actual surface temperature of about 14 °C. The mechanism that produces this difference between the actual surface temperature and the effective temperature is due to the atmosphere and is known as the greenhouse effect.
Earth’s natural greenhouse effect makes life as we know it possible. However, human activities, primarily the burning of fossil fuels and clearing of forests, have intensified the natural greenhouse effect, causing global warming.
There are two common meanings of the term “greenhouse effect”. There is a “natural” greenhouse effect that keeps the Earth’s climate warm and habitable. There is also the “man-made” greenhouse effect, which is the enhancement of Earth’s natural greenhouse effect by the addition of greenhouse gases from the burning of fossil fuels (mainly petroleum, coal, and natural gas).
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.
You can think of greenhouse gases as sort of a “blanket” for infrared radiation — they keep the Earth’s surface and lower layers of the atmosphere warmer, and the upper layers colder, than if the greenhouse gases were not there.
About 80-90% of the Earth’s natural greenhouse effect is due to water vapor and clouds. Most of the rest is due to carbon dioxide, methane, and a few other minor gases. While the remaining gases in the atmosphere (e.g. nitrogen, oxygen) also absorb and emit a small amount of infrared radiation, their radiative effect on temperature is so weak that they can be neglected. While methane is a much more potent greenhouse gas than carbon dioxide, there is far less of it in the atmosphere.
It is the carbon dioxide concentration that is increasing, due to the burning of fossil fuels (as well as from some rainforest burning). Compared to a pre-industrial atmospheric concentration of around 270 parts per million (ppm), the average concentration has increased to close to 400 ppm in 2012. This causes the man-made portion of the greenhouse effect, and it is believed by many scientists to be responsible for the global warming of the last 50 years or more.
Also, the concentration of methane, although extremely small (measured in parts per billion), has also increased in recent decades contributing somewhat to the strengthening of the greenhouse effect. The reasons for this increase, though, remain uncertain.