Thermal radiation is radiation (photons) that is emitted by matter, where the energy or frequency spectrum is characterized by the temperature of the matter.
The temperature of the matter will determine the relative number of atoms and molecules in their various energy levels, the amount of ionisation, the distribution of speeds of atoms and molecules in a gas or the frequency spectrum of vibrational modes in a solid.
Thermal radiation can take many forms. It can be in the form of sharp, discrete spectral lines arising from the emission of photons corresponding to transitions between energy states (e.g. vibrational and rotational) in a molecule or due to transitions between discrete energy levels in an atom. That is, molecules are able to rotate or vibrate, such that they have rotational and vibrational energies that take on discrete values. How many molecules are in which energy states is determined by the temperature. Molecules more frequently occupy higher energy states at higher temperatures. They may transition to a lower energy state by emitting photons with energies corresponding to the energy difference. Similarly, electrons in atoms occupy discrete energy levels and can move between them by absorbing or emitting photons of the right energies. Higher temperatures mean more atoms in higher ("excited") energy states.
But thermal radiation can also be a continuous spectrum of frequencies, for example light emitted as a result of free electrons combining with ions; the acceleration of free electrons by ions in a hot gas; or the overlapping emission from many, closely spaced vibrational states in a solid.