The term stellar evolution refers to a star's changing stellar structure over its own lifetime. The term is used for how individual stars change and die rather than to the differences between stars born in previous and subsequent eras, as would be implied by "evolution" as the word is used in biology. The length of time in each phase in their life is of interest.
Stellar evolution models of main sequence stars take into account the change in the constituents of stars as fusion reduces the hydrogen, i.e., gradually changing stellar structure models. Essentially, they work through stellar structure at a given time, take into account the ongoing changes in composition implied by the model as well as with any structural "movement" that it triggers, work out the structure after some time-step, and repeat.
Such models can be checked somewhat through star counts and the resulting H-R diagrams, to identify the counts of stars in different phases and see if the counts are consistent with the stellar evolution models and what's known of the galaxy's star formation.
Among the general phases in the life of a main sequence star according to well-established models:
Among the factors that have to be taken into account when modeling are the changing composition due to fusion, mass, diffusion, settling due to gravity, mixing/homogenization (e.g., due to convection), the affects of stellar rotation, mass gain and loss (e.g., accretion and stellar wind), interactions among binary stars. The initial mass of the star is a major factor (c.f., Vogt-Russell theorem), particularly in determining the luminosity and the lengths of time in each phase, the more massive stars being more luminous, the greater luminosity more than making up for their greater mass, giving them shorter lives and less time in each phase.