Final answer:
A star leaves the main sequence when the hydrogen fuel in its core is used up.
Step-by-step explanation:
When a star leaves the main sequence depends on the depletion of hydrogen fuel in its core. Once the hydrogen fuel in the core is used up, the star begins to leave the main sequence. As more time passes, stars of lower mass also leave the main sequence and evolve into red giants or supergiants.