This is the fate of stars like our Sun, stars with less than 10 solar masses.
White dwarfs are very small, typically about the size of the Earth .
Yet they contain as much mass as a star. The white dwarf is made primarily out of carbon. It is the surviving core of the star where fusion turned H and He into Carbon. While a star, fusion generated heat a pressure to withstand gravity. The answer is electron degeneracy , which we discussed before.