The greenhouse effect occurs when certain gases in the Earth's atmosphere (the air around the Earth) trap infrared radiation. This makes the planet become warmer, similar to the way a greenhouse becomes warmer.
The most important greenhouse gases in Earth's atmosphere are: water vapor, carbon dioxide(CO2), and methane. When there is more greenhouse gas in the air, the air holds more heat. This is why more greenhouse gases cause climate change and global warming.