Stars can be said to go through the same stages of life as people: birth, infancy, maturity, old age, and death.
As with people, stars are not all the same.
The differences in their lives, their spectral class, life expectancy, and eventual end, depend primarily on their mass, or the amount of matter they have.
The bigger the star, the shorter its lifespan.
This is because massive stars have greater pressure on their cores, causing them to burn hydrogen more rapidly.