Read this excerpt from "Why Are They Called Black Holes?"
When the star gets big enough and hot enough, the central core has enough energy to fuse hydrogen atoms into helium atoms. These reactions release energy that pushes matter out, fighting the force of gravity and keeping the star from collapsing into itself. After many millions or billions of years, the star runs out of hydrogen and energy. Then the star "dies" and collapses into a dense little ball with tons of gravity. Albert Einstein's theory of relativity predicted that black holes would have to exist if a dead star had enough gravity.
How long can a star live?
billions of years
just until it gets hot
fewer than one million years
until it is big enough to become a black hole