The Earth receives energy from the Sun in the form of radiation. Most of the energy is in visible wavelengths and in infrared wavelengths that are near the visible range. The Earth reflects about 30% of the incoming solar radiation. The remaining 70% is absorbed, warming the land, atmosphere and ocean. Greenhouse gases in the air trap this heat and keep it within the earth's atmosphere. This additional warming of the earth's atmosphere due to greenhouse gases is called the greenhouse effect. Its name was derived from a greenhouse which works on a similar theory. In the absence of the greenhouse effect the temperature of the earth's atmosphere would be 14 degrees celsius.
The molecules/atoms that constitute the bulk of the atmosphere: oxygen (O2), nitrogen (N2) and argon (Ar); do not interact with infrared radiation significantly. In the Earth’s atmosphere, the dominant infrared absorbing gases are water vapor, carbon dioxide, and ozone (O3). [1] In today's world, due to the large amount of greenhouse gases emitted by humans the greenhouse effect is working more than needed and the average temperature of the earth's temperature is constantly rising. This is the reason for the tremendous need to make a change today and prevent furthur global warming.
For furthur information: [1]
http://en.wikipedia.org/wiki/Greenhouse_effect