When we observe stars, we can use the data we collect to calculate their brightness (called magnitude) and their temperature. If you plot those two number on a graph with temperature on the x-axis and brightness on the y-axis, you see that the data seem to gather in clumps (Figure 16.4 in the Physical Science course). There is a band of stars that goes diagonally down the graph, another group that clumps across the top of the graph, another that clumps high and to the right, and another that clumps low and near the middle.
Astronomers assume that these clumps are stars which are similar. Thus, they came up with classification names for each clump. The diagonal clump is the “main sequence,” the top clump is the “supergiant” classification, the upper-right clump is the “red giant” group, and the lower middle group is the “white dwarf” group.
When a new star is discovered, its magnitude and brightness are calculated to find its place on the graph (called the Hertzsprung-Russell Diagram), and its classification is then determined by which clump it falls into.