The greenhouse effect is the way in which heat is trapped close to Earth's surface by “greenhouse gases.” These heat-trapping gases can be thought of as a blanket wrapped around Earth, keeping the planet toastier than it would be without them.
Greenhouse gases include carbon dioxide, methane, nitrous oxides, and water vapor. (Water vapor, which response physically or chemically to changes in temperature, is called a "feedback.")
This keeps the earth's surface warm and prevents it from freezing.