A white dwarf is a compact star. Their matter is squashed together. Gravitation has pulled the atoms close together, and taken off their electrons. The mass of a white dwarf is similar to the mass of the Sun, but its volume is similar to that of the Earth.