Heat always makes atoms vibrate and crash into each other constantly. In dense solids or liquids, the individual atoms are packed very tightly together. These packed atoms interact incredibly strongly with all their close neighbors.
This constant crashing blurs their normal electron energy levels together. The levels turn into a messy continuum instead of clear individual steps. The atoms emit light at every possible wavelength as they vibrate.
This wide emission creates an unbroken rainbow of colors. This behavior is very different from a thin and isolated gas. Isolated gas atoms have sharp and widely spaced electron energy levels.
They can only emit very specific colors of light. Those specific colors create a broken pattern called a line spectrum. Scientists use Planck’s law to describe these glowing dense objects.
They call these glowing objects blackbody radiators in physics and chemistry. A common student mistake is thinking all hot things make continuous spectra. A hot but thin gas will actually make a line spectrum instead. The matter must be very dense for the energy levels to blur together.
