The Sun gets its energy by crushing together hydrogen and other atoms until they fuse together. By Einstein’s famous equation E = mc2, this energy output leads to a loss in the Sun’s mass of over 350 billion tonnes each day.
That sounds a lot, but it’s dwarfed by the Sun’s total mass of two billion billion billion tonnes. And in any case, for most of its life the Sun more or less maintains its size by balancing the inward-acting force of gravity against the outward pressure caused by its nuclear fusion reactions. But over billions of years, the Sun will burn through so much of its fuel that this balancing act can no longer be sustained.
Changes in the Sun’s internal composition will lead to the outward pressure getting so strong that the Sun’s gravity will no longer resist it – and the Sun will begin to expand. Eventually it will become a colossal red giant star, ballooning out almost as far as the Earth’s orbit.