A spectral line is a dark or bright line in an otherwise uniform and continuous
spectrum, resulting from an excess or deficiency of photons in a narrow frequency range, compared with the nearby frequencies.Spectral lines are the result of interaction between a
quantum system (usually
atoms, but sometimes
molecules or
atomic nuclei) and single
photons. When a photon has exactly the right energy to allow a change in the energy state of the system (in the case of an atom this is usually an
electron changing
orbitals), the photon is absorbed. Then it will be spontaneously re-emitted, either in the same frequency as the original or in a cascade, where the sum of the energies of the photons emitted will be the same as the energy of the one absorbed. The direction of the new photons will not be related to the direction of travel of the original photon.
See more at Wikipedia.org...