Once all the helium disappears, the forces of gravity will take over, and the sun will shrink into a white dwarf. All the outer material will dissipate, leaving behind a planetary nebula.