Because stellar lifetimes range from perhaps 40,000 years to longer than 10 billion years, astronomers never get to watch a particular star go through all of its life cycle phases. However, there are millions of stars to look at around the galaxy, each one at a different point in its life cycle. These images can be sequenced in a logical manner, based on a knowledge of astrophysics. People are in much the same situation. Most people can both identify the various stages of the human life cycle that observable all around us, and put those stages in sequence.
Astronomers have the same task when classifying stars.
The picture begins with a large cloud of interstellar gas and dust, mostly hydrogen. For reasons that astronomers don't completely understand, these clouds begin to collapse under their own gravity and heat up. The outward force of radiation emitted from the star's core is exactly balanced by its own gravity pulling inward. This balanced state is called hydrostatic equilibrium. Usually, astronomers describe stars in this equilibrium state as being main sequence stars .