The star is in energy balance when its core energy production matches the amount of energy it radiates into space. This is only true when the star is a main-sequence star with a hydrogen core fusion and when it is a helium core-fusion star. It is out of energy balance at all other times, which is why it is either contracting or expanding.
Stars can squeeze various types of atomic fuel together, and it's through this process that we get almost every element in the universe. Stars contain a lot of mass which has a lot of gravity. The gravity pulls inwards, which could cause a star to collapse in on itself. In a main sequence star, this inward pull is balanced by the outward gas pressure due to the nuclear fusion reactions deep in the star's core. This balance is called hydrostatic equilibrium and stops the main sequence stars from collapsing.
Learn more about the stars here:
https://brainly.com/question/23661928
#SPJ4