The Hertzsprung Russell Diagram
Stars are classified to identify any patterns. Maybe the most useful way to identify patterns is to plot luminosity (using a log scale) against spectral class. Such a diagram is called a Hertzsprung – Russell diagram.
This done, we can identify four main types of star. Most of them lie on a band from top left to bottom right. These are main sequence stars, of which our Sun is one. The most massive main sequence stars are at the top left and the smallest ones at the bottom right. When a star reaches the end of it's life, it wanders all over the diagram, becoming a red giant or supergiant and finally a white dwarf, neutron star or black hole. Neutron stars are in the same region as white dwarves, having high temperature and low luminosity while for a black hole, the luminosity and temperature are meaningless.