This video describes the process of spectroscopy.

source