The Earth radiates heat from the surface back into the atmosphere, where it can pass back into space, or get reflected again, or, because it has now got a longer wavelength than before, it can get absorbed by the water vapour, carbon dioxide, methane and other greenhouse gases which are present in the atmosphere.