All objects radiate energy and heat, even your own body. However, the radiation coming from hotter objects is more intense than that coming from cooler objects. Radiation leaves an object in the form of waves. The hotter an object, the shorter the wavelength of this radiation.
As you stand in front of a camp fire holding your cold fingertips out in front of you, what do you feel? Slowly your fingers begin to warm up as they absorb the radiation coming from the fire. The infrared waves, or heat rays, leave the hot fire, and radiate out towards your hands.
An object that is especially good at radiating heat is referred to as a blackbody. Both the Sun and the Earth are excellent radiators, and as a result, both are considered blackbodies.