Here's a breakdown:
* Gravity: A star's immense mass exerts a powerful inward pull, trying to crush it.
* Internal Pressure: Nuclear fusion reactions in the star's core generate tremendous outward pressure.
* Hydrostatic Equilibrium: These two opposing forces (gravity and internal pressure) are perfectly balanced, creating a stable state where the star neither collapses nor expands.
Think of it like a tug-of-war: gravity pulls inward, fusion pushes outward, and they remain in a constant stalemate. This balance is what allows stars to exist for billions of years.