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.
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, this idealized planet's effective temperature (the temperature of a blackbody that would emit the same amount of radiation) would be about 18 C. The surface temperature of this hypothetical planet is 33 C below Earth's actual surface temperature of approximately 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.
Earths 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.