1. Gravity: This force pulls all the matter in the star inwards towards its center. It is the primary force responsible for holding the star together.
2. Nuclear Fusion: This force pushes outward, creating energy and light. It is the result of hydrogen atoms fusing together to form helium in the star's core, releasing enormous amounts of energy.
These two forces are in a constant state of balance. If gravity were stronger, the star would collapse in on itself. If nuclear fusion were stronger, the star would explode. This balance is what allows stars to remain stable for millions or even billions of years.