The night sky is full of stars. Though they might look similar on earth, stars are very different from each other. Some stars are hotter and larger than others - and might even be a different color. In order to classify stars, astronomers use a scale with the categories O, B, A, F, G, K, and M.
Stars that are classified with the letter O are the largest type of stars, they tend to produce blue wavelengths of light. A class stars are smaller than O class stars and produce white light. G class stars are smaller than O class stars and produce yellow light. K class stars produce orange light and M stars are the smallest of all, producing red light.
Scientists have a good enough understanding of stars that they can determine what their chemical composition is. By looking at the wavelengths of light that are produced by a star, scientists can determine what elements it is made of. The machine that collects the wavelengths of light produced by a star is called a spectrograph.
This image is an example of a spectrum analysis.