First sunlight shines onto the earth's surface where it is absorbed and then radiates back into the atmosphere as heat. In the atmosphere, "greenhouse" gases trap some of thishear , and the rest escapes into space. The more greenhouse gases are in the atmosphere,the more heat gets trapped.