A star like the sun generates a huge quantity of energy because its core undergoes fusion, wherein hydrogen turns into helium. Over time though, the hydrogen at the core diminishes, thus preventing fusion. As the star begins to end, there will emerge a new source of hydrogen fuel which will make the outer layer of the star become bigger and fiery red. Ultimately, this fuel will run out and collapse. It then turns into a white dwarf. The hot temperature of the core of the star will cool down after billions of years. A white dwarf will die down into either a black hole or a neutron star.
There are two types of white dwarf stars. The first one has an outer layer composed of 80% of hydrogen while second type has an outer layer made up of 20% of helium. Both have their hydrogen shells gone. In 2007, a third kind of white dwarf star was discovered where both its helium and hydrogen shells have vanished, revealing its carbon layer.
The size of a white dwarf is that of the size of the Earth. The difference is that the white dwarf is denser or heavier than Earth and a million times denser than the sun itself. Scientists are interested about white dwarf stars because they wish to know more about the lifetime or life span of a star. It will give them an idea about our own sun and its lifetime. The study of star or stellar interiors is asteroseismology.