Answers: In short, stars have different colours because they have different surface temperatures. Imaging sticking an iron poker into a very hot furnace, it will turn red, yellow and then white while it is heating up. The colour of the iron poker reflects how hot it is. The same applies to the star. Astronomers classify star into different spectral type by their colour, using detailed studies of the spectrum of their starlight. The basic classification scheme was developed by Henry Draper at Harvard. This scheme labels stars according to their spectra and colours as O, B, A, F, G, K and M, in decreasing order of temperature. The standard mnemonic to remember the sequence of spectral types is ``Oh, Be A Fine Girl, Kiss Me.''
|| Type Colour
|| Surface Temperature
|* 0 K = -273¢XC
For more information, you can see chapter 12 of the self-learning astronomy course
"Nature of the Universe" in our homepage.