The Earth gets energy from the sun in the form of sunlight. The Earth's surface absorbs some of this energy and heats up. That's why the surface of a road can feel hot even after the sun has gone down—because it has absorbed a lot of energy from the sun. The Earth cools down by giving off a different form of energy, called infrared radiation. But before all this radiation can escape to outer space, greenhouse gases in the atmosphere absorb some of it, which makes the atmosphere warmer. As the atmosphere gets warmer, it makes the Earth's surface warmer, too.