A star's lifespan is measured in millions or billions of years. However, just as a caterpillar becomes a moth, stars metamorphose into other objects as they age.
As the outer layers fall, they heat up enough to cause fusion to occur, thus providing a new source of energy for the star. The core now becomes hotter than before, causing the outer layers to swell and glow red. When this happens the star is called a red giant.
As the years continue, this red giant will continue to lose its brightness and very slowly fade away. Eventually, it will change again depending on its size. It may explode, spreading particles throughout the galaxy to possibly become seeds of future creation.
It may die quietly; smaller red giants (about the mass of our own sun) lose fuel, cooling and contracting so the inner core releases heat which make the outer layers expand and blow away to provide gasses for new stars. The left behind inner core compresses to about the size of Earth creating a white dwarf.