The earth's atmosphere is made up of different layers. Gases as Carbon dioxode, Methane, Nitrous oxide, Choloroflurocarbons, Methyl bromide etc. make the atmosphere work like a green house. These gases trap heat emitted by infrared wavelengths from the earth's surface.