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 atmosphere tend to be transparent at visible frequencies (which is why we can see though it, duh) and to absorb infrared 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 (infrared) 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 effect, it is more helpful to think of it beginning at a "surface" halfway up the atmosphere). Upwelling thermal infrared 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 its balmy heat.
For an example of a place without any greenhouse effect, just look at our moon, where temperatures reach the triple digits below and above zero Celsius in the course of one "day" (i.e. roughly a month)
 See also
- Greenhouse effect, University Corporation for Atmospheric Research
- Stephen Hawking and Carl Sagan on the Greenhouse Effect