The major part of a star's life is spent on the main sequence. While there, the star burns hydrogen to helium in its core and there is an exquisite hydrostatic balance between gravity and pressure that keeps the star very stable.