For most of its lifetime, a star is a main sequenceA stable stage in the life cycle of a star. Nuclear fusion occurs, fusing hydrogen nuclei into helium nuclei. There is a balance between the outwards radiation and the force of gravity pulling inwards. star. It is stable, with balanced forces keeping it the same size all the time. During this period:
gravitational attraction tends to collapse the star
radiation pressure from the fusion reactions tends to expand the star
forces caused by gravitational attraction and fusion energy are balanced, leading to a state of equilibrium between gravitational collapse and the energy released during fusion