Greenhouse gases interact with infrared radiation. The model for the earth and its atmosphere is that of a greenhouse. As infrared radiation energy released from the earth passes through the atmosphere these gases can absorb some of it. If they re-radiate the IR back to earth, the net effect is that of a blanket. So, changing the concentration of these gases in the atmosphere may have the effect of being a blanket.
Introduction to IR Spectroscopy and Greenhouse Gases