All stars eventually exhaust their nuclear fuel, running out of fusible material.
The Egg Nebula, as imaged here by Hubble, is a preplanetary nebula, as its outer layers have not yet been heated to sufficient temperatures by the central, contracting star. Many of the giant stars visible today will evolve into a nebula like this before shedding their outer layers completely and dying in a white dwarf/planetary nebula combination. (Credit: NASA and the Hubble Heritage Team (STScI/AURA), Hubble Space Telescope/ACS)