All stars begin as Nebulae. Nebulae are floating clouds of gas in space. They are the birthplace of stars and planets.
Next, the developing star becomes a proplyd. A proplyd is the very beginnings of a star. The nebulae is pulled together by its own gravity and begins to heat up and condense.
Next, the proplyd turns into a protostar. This happens when the gravity of the previous cloud becomes greater, and causes the proplyd to spin and condense even further, and the protostar begins to perform nuclear fusion.
The protostar then forms into a main sequence star, of which the star will spend most of its life in a stable state. The star will then perform nuclear fusion for billions of years until its hydrogen resources are depleted.
In the last stages of the star, the medium sized stars will turn into a red giant, and the large sized stars will turn into red supergiants.
In the final stage, medium size stars will result in a white dwarf star, and the large stars will supernova and form into a black hole or neutron star.
Lastly, the supernova's from the large star's explosion is what creates the new nebulae, which will restart the cycle of the rebirth of stars