Black Body Radiation, Absorption, and Re-Radiation
Black body radiation is the electromagnetic waves given off by all matter.
Hotter things radiate shorter wavelengths (higher energy) than cooler things. The sun radiates at about 6000 degrees C with an emission peak in visible wavelengths.
The earth absorbs the sun's radiation, becomes warm and re-radiates at a much cooler temperature of 15 degrees C, with an emissions peak in the infrared.