1. The sun emits UV radiation to the Earth's surface.2. This is converted into Infrared radiation (heat) and emitted by the surface.3. Greenhouse gases in the atmosphere, such as carbon dioxide and methane, absorb the infrared radiation which would otherwise have been lost into space and re-emit it in all directions.4. This means some is lost into space and some is emitted back to the surface, warming the earth back up. Without this effect, the Earth would be a frozen wasteland.