As well as being warmed by shortwave radiation from the Sun, the Earth’s surface is significantly heated by the long wave radiation emitted by the atmosphere and absorbed by the ground. Let’s look at this in more detail. The energy flows between the surface, atmosphere, and space. Some of this radiation is reflected back to space, but much is absorbed, warming the surface.
Meanwhile, the Earth’s surface emits long-wave radiation upwards. Some of this radiation escapes directly to space, while the remainder is absorbed by the atmosphere. What about long-wave radiation emitted by the atmosphere? Although the atmosphere is colder than the surface, it also emits long-wave radiation, which is emitted in all directions, and so some radiates upward to space while the remainder radiates downward toward the Earth’s surface. We call this downward flow counter radiation. It replaces some of the heat emitted by the surface.
Counter radiation depends strongly on the presence of carbon dioxide and water vapor in the atmosphere. Remember that much of the long-wave radiation emitted upward from the Earth’s surface is absorbed by these two gases. This absorbed energy raises the temperature of the atmosphere, causing it to emit more counter radiation. So, the lower atmosphere, with its long-wave-absorbing gases, acts like a blanket that traps heat underneath it. Cloud layers, which are composed of tiny water droplets, are even more important than carbon dioxide and water vapor in producing a blanketing effect because liquid water is also a strong absorber of long-wave radiation. This mechanism, in which the atmosphere traps long-wave radiation and returns it to the surface through counter radiation, is termed the greenhouse effect.
Unfortunately, the term greenhouse is not quite accurate. Like the atmosphere, the window glass in a greenhouse is transparent to solar shortwave radiation while absorbing and reradiating
References: http://classof1.com/homework-help/earth-science-homework-help/