I just read this from Wikipedia: Incandescence occurs in light bulbs, because the filament resists electron flow. This excites electrons in the filament material to jump to a higher atomic orbital and thus subsequently release a photon when they fall back to their original orbits. Depending on the energy difference between the two orbits, the emitted photon is of a different wavelength. Which means that if the filament is made of tungsten, then only photons having an energy (wavelength) corresponding to the energy levels of the atoms of tungsten can be emitted. Then how can the observed continuous spectrum be explained?