How Are Spectral Lines Produced