Emission and absorption spectra of chemicals
If you bring some sodium salt e.g. table salt over a flame, you will get a yellow light. If you use a "cereal-box-CD-spectroscope", you will notice that the emitted light gives a spectrum (emission spectrum) consisting of two yellow lines. These are two specific wavelenghts corresponding to sodium.
Spectra of stars
If you examine the Sun spectrum, you will find two dark lines at the specific wavelenghts for sodium. Light from the hot core of the Sun is absorbed by sodium in the atmosphere of the star before it arrives to us and those two specific wavelengths appear to us as if they are "subtracted".