Some of the electromagnetic radiation eliminated ny the sun reaches earth and is absorbed. The earth re-emits some of it as IR. Molecules of greenhouse gases in atmosphere absorb the IR. Burning fossil fuels and leaving rubbish in landfill has caused rise in greenhouse gases