Any star's life cycle begins in Nebula. Nebula is made of gas, dust,hydrogen and helium.
Nebula then become protostars, gravity pulls the hydrogen gas in the nebula together and it begins to spin. As the gas spins faster, it heats up.
It's called main sequence star
Eventually the temperature will increase and nuclear fusion occurs in the cloud's core. The cloud begins to glow brightly and it contracts a little and becomes stable.
As the main sequence star glows, hydrogen in the core is converted into helium by nuclear fusion. When the hydrogen in the core begins to run out, the core becomes unstable and contracts. The outer shell of the star starts to grow red.
It's me, Red Giant
Throughout the red giant phase, the hydrogen gas in the outer shell continues to burn and the temperature continues to increase, the helium atoms in the core fuse to form carbon atoms. The last of the hydrogen gas in the outer shell is blown away to form a ring around the core. This ring is called a planetary nebula
As the last of the helium atoms in the core are fused into carbon atoms, the medium size star begins to die. Gravity causes the last of the star's matter to collapse inward and this is called White Dwarf then becomes Black Dwarf when the energy runs out and no longer emit lights.