Greenhouses work by allowing the heat from the Sun to go straight through glass windows, but then once inside, it becomes trapped and the inside of the greenhouse gets hotter.
You can see more detail in this demonstration.
The same thing can happen in the atmospheres of planets, where instead of glass, some gases stop the heat from escaping back into space. These gases are called Greenhouse Gases and the more of them there are in the atmosphere, the stronger the greenhouse effect.
On Earth these gases are; methane, water vapour and carbon dioxide. All of these gases occur naturally, but the levels can also be increased by human activity:
- Methane occurs when plants decompose, but is increased by rice and cattle farming, as well as coal mining.
- Water vapour is released when water from oceans and lakes evaporates, but is increased by burning certain fuels.
- Carbon dioxide is released when plants and animals respire, and during forest fires and volcanoes. However, it is also also produced when we burn fossil fuels and make cement.
When forests are removed (deforestation) to make way for farming this can also increase the amount of carbon dioxide in the atmosphere as trees naturally remove the gas.
If the amount of greenhouse gases increases, so does the average temperature on Earth, and this can lead to climate change and the melting of polar ice, leading to increased sea levels.
Venus has a much stronger greenhouse effect than the Earth, and is nearly 400°C hotter than it would otherwise be. It is the greenhouse effect which makes the surface of Venus even hotter than Mercury, even though it's further away from the Sun.