All bodies (objects) emit and absorb types of electromagnetic radiation. They do this regardless of their temperature.
The intensity of radiation increases as the body gets hotter and gives out more radiation in a given time. The type of radiation emitted also changes with temperature.
Bodies emit a continuous range of electromagnetic radiation at different energy values – this means that the radiation that is emitted is spread out over a range of different frequencies and wavelengths. Here is the intensity-wavelength graph for the Sun.
As the surface temperature of a hot body such as a star increases:
The graph for a hot star, such as a blue supergiant, peaks over a shorter wavelength than a cooler star such as a red giant. The intensity of radiation for each frequency is higher for a very hot star than for a cooler one.
A perfect black body is a theoretical object. It would have these properties:
An object that is good at absorbing radiation is also a good emitter, so a perfect black body would be the best possible emitter of radiation.
There are no known objects that are perfect at absorbing or emitting all radiation of every possible frequency that may be directed at it. Some objects do, however, come close to this and these are referred to as black bodies.
Stars are considered to be black bodies because they are very good emitters of most wavelengths in the electromagnetic spectrum. This suggests that stars also absorb most wavelengths. Whilst there are a few wavelengths that stars do not absorb or emit, this figure is very low, so they can be treated as black bodies. Planets and black holes are also treated as nearly perfect black bodies.
White and shiny silvery surfaces are the worst absorbers, as they reflect all visible light wavelengths. Poor absorbers are also poor emitters, and do not emit radiation as quickly as darker colours. Radiators in homes are usually painted white so that the infrared radiation is emitted gradually.