The largest number of visible stars are classed as main sequence, or medium-sized stars. Our Sun falls into this group. They vary in size from about ten times to one-tenth the Sun's diameter. Stars smaller than the main sequence are called dwarfs. They have comparatively high densities.
White dwarfs are about the size of the Earth and appear very faint.
They are extremely dense - from up to 20 million times the density of water. There could be as many as 5000 million white dwarfs in the Milky Way alone. But only 150 of these have been detected so far. All stars begin their life as a cloud of hydrogen gas and dust, there are plenty of such clouds in the universe. As the cloud collapses, it begins to rotate and it's centre begins to heat up.