It's the fuel that a star burns to maintain thermal equilibrium that determines what stage of evolution it is in. The smaller a star is, by the way, the longer it lasts because thermal equilibrium is easier to maintain, costing less nuclear fuel.
All stars begin in the main-sequence stage in which hydrogen is fused in the core. This is the longest-lasting stage of any type of star, because hydrogen fusion releases the most energy per mass. When the hydrogen in the core is gone, another stage begins.
A red dwarf will not reach another stage, due to its lack of mass, but will become a degenerate white dwarf composed of helium, the byproduct of hydrogen. This may take a trillion years or more, however, longer than the age of the universe.
For a star like our sun, hydrogen fusion will continue outside the degenerate helium core. It will expand to a red giant in order to dissipate the additional heat. The next stage begins as the helium core then ignites, about a billion years later. This will last only about 100 million years until there is a degenerate core composed of carbon and oxygen, the byproduct of helium fusion.
In even heavier stars, carbon fusion continues when helium fusion is over. It's still in the red giant phase, however. When that's over, in even shorter time, a degenerate core of magnesium, neon, and oxygen remains.
In massive stars, the main sequence is a blue giant star. It will have a red supergiant phase instead of a red giant phase. In that it will fuse elements beyond carbon. It will continue with neon, oxygen, and then silicon, each the byproduct of the previous. But each will burn faster. The silicon burning phase will last about a week, building up an iron core. When fusion can no longer produce enough energy, the core will collapse not to electron degeneracy, but to neutron degeneracy: a neutron star. It is no longer iron, but a single atomic nucleus weighing more than the sun. Further nuclear fusion is not even possible in this state.