A star is a dynamic object, either in a semi stable equilibrium, with the gravitational force tending to compress the star equal to the gas pressure tending to expand the star. When the conditions of equilibrium change - when hydrogen is exhausted in the core for example - the star must move to a new equilibrium. A star spends mist of its life on the main sequence. When hydrogen in the core is exhausted, the core contracts and heats up. A star the same mass as the Sun will become a red giant. then a white dwarf. Larger stars might become supergiants, undergo a supernova explosion, then become a neutron star of black hole. Whatever the star, as equilibrium conditions change the star will move to a new position on the Hertzsprung Russel diagram. The path followed is called an 'evolutionary track'. Two are shown, one for a Sun sized star and one for a star five times the mass of the Sun.