Answer: The star's outer layers drifts away.
Explanation: When a star starts running out of fuel the pressure in the core becomes very high which pushes the outer layers of the star.
A sun like star becomes a red giant and after throwing away the mass, the core contracts to becomes a white dwarf.
A massive star becomes super-giant and then the core becomes a neutron star or a black-hole.