Electromagnetic radiations energy varies from low (microwave) to high (ionizing radiations). When a body (matter) receives energy, either by heating or from an electromagnetic source, some of the energy is absorbed, some reflected and some pass through it. It is then supposed to absorb as well emit all energies (or frequencies).
A black body is a perfect (100%) absorber and perfect emitter. All other matter also can be considered similar to black body in absorbing and emitting radiations. The color of an absorbing body changes through red, yellow, bluish green to finally white emitting in the ultraviolet regions. Changing colors, indicates absorption or emission of radiation of a characteristic frequency/ energy/ wavelength with increasing temperature, and not all available energies. So, absorption or emission of energy by matter is discrete rather than continuous.
The emitting radiations have high energy /frequencies at high temperatures. Actual temperatures at which the color change occurs depends on the metal.
Plank explained this, by considering the atoms of matter as atomic oscillators that can absorb only specific energy suitable for their vibrations and emit radiations corresponding to them only. The quantum concept of radiations is akin to the particle nature of matter. Hence Planks theory extends the dual theory of light to all electromagnetic radiations.