Did you know that there is more than just one type of star? Stars are classified by their spectra, or colors of light, that they give off. These colors tell astronomers the chemical make up of the star and it’s temperature.
Most stars are currently classified using what is called the Morgan–Keenan (MK) system using the letters O, B, A, F, G, K, and M, in order of temperature where the M type is the coolest and the O type is the hottest. Each letter class is then subdivided into even more categories, where each letter is given a number from 0-9, where 0 is the hottest and 9 is the coolest of that particular category.
There are also names for star types, some of which you may be familiar with. There are brown dwarfs, white dwarfs, red dwarfs, sub dwarfs, sub giants, giants, bright giants, super giants, and hyper giants. Star types are not limited to these names, as there are many more. Our Sun is a yellow dwarf, and in the Morgan-Keenan system it is a G2 star.
To read more about star classification, try this link.