Example: An atom with electron in the E1 orbit sees a photon with energy Ephoton = E2 - E1. The photon is absorbed and electron moves to E2. The photon is later re-emitted but in a random direction---not necessarily in the same direction as the original photon! An observer will see less photons from the direction of the continuous source at that specific frequency (color) than other frequencies (colors). Photons of other energies pass right on by without being absorbed. The atom can absorb photons of just the right energy to move an electron from one energy level to another level. The more atoms undergoing a particular absorption transition, the darker (or ``stronger'') the absorption line. The strength of the absorption line depends on the density and temperature.
A thermal spectrum is produced by atoms that are closely packed together. The energy levels of the atoms are distorted by their neighboring atom's electrons. This smears out the normally sharp spectral lines (they become fatter).
Example: An orange line is fattened so that one edge is in the yellow wavelengths and the other edge is in the red wavelengths. The amount of smearing, or broadening, depends