The greenhouse effect occurs when heat-trapping gases in a planet's atmosphere prevent the planet from losing heat to space, raising its surface temperature. Surface heating can happen from an internal heat source (as in the case of Jupiter) or come from an external source, such as a host star. In the case of Earth, the Sun emits shortwave radiation (sunlight) that passes through greenhouse gases to heat the Earth's surface. In response, the Earth's surface emits longwave radiation that is mostly absorbed by greenhouse gases, reducing the rate at which the Earth can cool off.
Without the greenhouse effect, the Earth's average surface temperature would be as cold as −18 °C (−0.4 °F). This is of course much less than the 20th century average of about 14 °C (57 °F). In addition to naturally present greenhouse gases, burning of fossil fuels has increased amounts of carbon dioxide and methane in the atmosphere. As a result, global warming of about 1.2 °C (2.2 °F) has occurred since the Industrial Revolution, with the global average surface temperature increasing at a rate of 0.18 °C (0.32 °F) per decade since 1981.