When light passes through a prism, it separates into the colors that make it up. White light changes to a swath of colors. This rainbow is called a spectrum.
Scientists build special instruments to separate light, usually with gratings.
These instruments are called spectrographs . When astronomers pass the light of a star through a spectrograph, they get a spectrum of the star. If that element is in the cool atmosphere of the star, those atoms will absorb the light at that color and produce the line. On the next page, you will figure out the composition of some stars made specifically for this study.