How? Star that start very heavy can continue fusing heavier and heavier atoms (our sun is very light and will die with a helium core). The energy released by fusion props up the rest of the star from the immense gravity. Well when very heavy stars start creating iron, fusion no longer releases excess energy.