Here's how it works:
1. Gravity: The massive amount of matter in a star creates intense gravity, pulling everything inward.
2. Fusion: At the core of a star, immense pressure and heat cause hydrogen atoms to fuse into helium, releasing a tremendous amount of energy.
3. Outward pressure: This energy from fusion creates an outward pressure that counteracts the inward pull of gravity.
4. Balance: The star maintains a stable state of equilibrium, where the inward force of gravity is balanced by the outward pressure from fusion.
Think of it like a tug-of-war:
* Gravity: One team pulling the rope inward.
* Fusion: The other team pulling the rope outward.
As long as the fusion process continues, the star will remain stable. However, when the star runs out of hydrogen fuel, fusion slows down, the outward pressure decreases, and gravity takes over. This is when the star enters its later stages of life, potentially collapsing into a white dwarf, neutron star, or even a black hole.