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.
|O||ionized and neutral helium, weakened hydrogen||bluish||above 31,000 K|
|B||neutral helium, stronger hydrogen||blue-white||9750-31,000 K|
|A||strong hydrogen, ionized metals||white||7100-9750 K|
|F||weaker hydrogen, ionized metals||yellowish white||5950-7100 K|
|G||still weaker hydrogen, ionized and neutral metals||yellowish||5250-5950 K|
|K||weak hydrogen, neutral metals||orange||3800-5250 K|
|M||little or no hydrogen, neutral metals, molecules||reddish||2200-3800 K|
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.