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. Examples of gasses: Carbon dioxide, methane, and water vapor.
Greenhouse gases (also known as GHGs) are gases in the earth’s atmosphere that trap heat.
During the day, the sun shines through the atmosphere, warming the earth’s surface. At night, earth's surface cools, releasing heat back into the air. But some of the heat is trapped by the greenhouse gases in the atmosphere. That's what keeps the earth’s temperature at an average 14˚C (57˚F).