Gravity pulls dust and gastogether (nebula) creating a protostar.
Temperatures rise as the protostar gets dense as particles collide. When temperature is high enough, Nuclearfuison forms heliumnuclei.
The Process of Nuclear fuison in the protostar, gives out a lot of energy, keeps the core hot. Creating a Star (Main Sequence Star)
Once a star starts to run out of Hydrogen, It willnot be able to go through Nuclear Fusion.
Hydrogen runs out, The star Swells into a RedGiant (If small) or a RedSuperGiant (if big). The surface cools down making it red.Heavier elementsform in core.
A small star forms a RedGiant.
A big star forms a RedSuperGiant.
Small Star - Red Giant = becomes unstable - Whitedwarf = Solid, dense core = cools down - BlackDwarf
Big Star - Red Super Giant = Glow brightly (more fuison) - Expand more - Explodes to Supernova - NeutronStar (ifbig) - BlackHole (if too big)
Blackhole - A massive star that is so dense that light is sucked in.