When we look at the stars in the sky, a few have distinctive colours to the naked eye, like Rigel and Betelgeuse in Orion, but most of them appear just white. This is because our eyes, especially in low light conditions, cannot distinguish colour very well. If we could, we would see that stars vary a great deal in the wavelengths of the light they produce.
There are lots of different types of star. They vary greatly in composition, size and temperature. We know now that stars change with time, evolving from one type to another, so we can also deduce the age of stars.
The main types of star are divided into a number of classes depending on their spectra and temperature.
|ionized and neutral helium, weakened hydrogen
|above 31,000 K
|neutral helium, stronger hydrogen
|strong hydrogen, ionized metals
|weaker hydrogen, ionized metals
|still weaker hydrogen, ionized and neutral metals
|weak hydrogen, neutral metals
|little or no hydrogen, neutral metals, molecules
Oh, Be A Fine Girl Kiss Me is the famous way of remembering these classes. There are actually a few others in non-visible wavelengths.
Each of these classes is then divided into 10. Our Sun is class G2. Have a good look at Orion. Betelgeuse is a class M star whilst Rigel is a class B star. One can clearly see the difference in colour even with the naked eye.
For more information about stellar spectra have a look at http://www.astro.uiuc.edu/~kaler/sow/spectra.html.