The greenhouse effect is caused by the varying absorption and transmission of electromagnetic radiation (mostly visible and infra-red) at different wavelengths. The gases which make up the atmospheric tend to be transparent at visible frequencies (which is why we can see though it, duh) and to absorb infra-red frequencies.
People find it remarkably hard to understand the greenhouse effect, and unhelpful "blanket" analogies abound. An easy, and very simple, way to understand it is this: the earth is heated by two sources: the sun, and the sky. It is therefore warmer than if it were heated by the sun alone. Increasing the amount of greenhouse gases increases the warming from the sky, without decreasing the heat from the sun, and therefore makes us warmer. This simple model is easily formalised and analysed  but the actual atmospheric greenhouse effect is more complex than this simple description .
To a first approximation, visible light from the sun passes through the atmosphere to be absorbed by the Earth's surface, where it is converted to heat and re-emitted as thermal (infra-red) radiation. Near the surface, the atmosphere is largely opaque to infra-red radiation, and heat is mostly carried upwards by convection not radiation. Higher up the atmosphere is colder and has less water vapour and so is less opaque, and radiation becomes more important (from the point of view of the greenhouse effet, it is more helpful to think of it beginning at a "surface" halfway up the atmosphere). Upwelling thermal infra-red is absorbed and re-emitted both upwards and downwards, leading to a warming of the surface.
The greenhouse effect is sometimes erroneously connected with ozone layer depletion; in fact ozone is a greenhouse gas, but present in small quantities.
The greenhouse effect is not the same effect as that which keeps greenhouses warm  (greenhouses are mostly warmed by the physical barrier of the glass or plastic preventing physical movement of the warmed air by convection). This is well known, but every now and again some cranks will deny that the greenhouse effect exists and claim that they have disproved global warming .
For an example of the greenhouse effect at work, one need only look at Venus, with it's balmy heat.
 See also
- Greenhouse effect, University Corporation for Atmospheric Research
- Stephen Hawking and Carl Sagan on the Greenhouse Effect