The Earth acts like a greenhouse that catches and traps heat from the sun.