The pressure of the energy generated in the solar core pushes outward and would cause the Sun to expand if it were not exactly balanced by the gravitational pressure of the Sun's outer layers.