The insolation received by the earth is in short waveforms and heats up its surface. The earth, after being heated itself becomes a radiating body and radiates energy to the atmosphere in the long waveform.
This energy heats up the atmosphere from below. This process is known as terrestrial radiation.
The longwave radiation is absorbed by atmospheric gases particularly by carbon dioxide and the other greenhouse gases. Thus, the atmosphere is indirectly heated by the earth’s radiation.