Main sequence stars fuse hydrogen into helium. Stars live the majority (about 90%) of their lives in this stage of their evolution. Our Sun is thought to be about 5 billion years into its 10 billion year main-sequence lifetime.
In a main sequence star, the inward gravitational force (due to the mass of the star) is balanced by the outward gas pressure (due to nuclear fusion reactions in the core). This balance is called hydrostatic equilibrium.
If the star starts to release less energy from the core the forces are no longer balanced. The gravitational force will cause the star to begin to contract. This contraction increases the temperature and pressure deep within the star. These conditions allow the core to release more energy which increases the outward gas pressure. The star returns to equilibrium, though may have a slightly different radius.
The mass of a star controls how much time a star spends in the main sequence stage. More massive stars use up their fuel more rapidly than less massive ones. When stars run out of fuel, they cannot keep the gravitational and gas pressure forces in balance. This results in a star expanding and evolving to become either a red giant or a supergiant star.