Any individual star's spectrum is different from most others, but similar to many others as well. This fact has led to the notion of categories, or 'classes' or 'types' of spectra. A star's class or type is determined by the appearance of its spectrum. At first you might think the different appearances are due to different constituents in the stellar chromospheres. That is not the primary cause, however. Temperature is the major determinant. So a star's spectrum is an indicator of its temperature. Of course its overall color is determined by its temperature, also, but the detailed appearance of absorption lines provides a much more precise temperature measure. The spectral classes are, in order of decreasing temperature, labeled O B A F G K M, for no good reason. (Actually because the classes were established and named before the temperature sequence was clearly understood.)