Stars spend most of their life in the appropriately named main sequence phase of their evolution. However, stars can not live forever; and they will eventually transition into a new phase, ultimately leaving behind a stellar remnant where their core once inhabited.
Creating a White Dwarf
The evolutionary path that a star takes is entirely dependent on its mass. Large mass stars - those with main sequence masses above 8 Sun masses - will eventually create a neutron star or black hole following a supernova event. (It is theorized that a main sequence star between 8 and 10.5 solar masses could produce a neon white dwarf instead of a neutron star, however the evidence for their existence is limited and it is not clear that the core would survive the core collapse during the supernova.)
Low mass stars on the other hand - those below about 0.5 solar masses - are light enough that their core temperatures never rise high enough to initiate the fusion of Helium into carbon and oxygen. Therefore, once their hydrogen fuel is depleted the core will no longer be able to resist gravitational collapse. The star will then compress into a helium white dwarf, composed mainly helium-4 nuclei.
However, how long a star survives is directly proportional to its mass. With such low mass, these stars would take longer than the age of the Universe to transition to a helium white dwarf. Therefore we wouldn't expect to see any of these objects yet. However, we do see some candidates, but they typically appear in binary systems, suggesting that a mass-loss mechanism is responsible for their creation, or at least for speeding up the process.
Typical white dwarfs, also known as a degenerate dwarf, are created from stars with main sequence masses between 0.5 and 8 solar masses. These stars, like our Sun, spend most of their lives fusing hydrogen into helium.
Once the hydrogen fuel is exhausted, the core will compress, heating it up until the fusion into carbon and oxygen is possible through the triple alpha process. (Two helium nuclei fuse to form beryllium, followed by the fusion of an additional helium creating carbon. A fourth helium can then fuse with carbon to form oxygen.)
Once the helium in the inner core has been fused the core will again compress. However, the core temperature will not reach where the fusion of carbon or oxygen is possible. The core will then stiffen, causing the star to enter a red giant phase (for the second time in its evolution). Eventually, the outer envelope of the star will become unbounded form the star, forming a planetary nebula and leaving the carbon-oxygen core - the white dwarf - exposed.
Death of White Dwarfs - Black Dwarfs
Because the white dwarf is no longer actively generating energy in its core due to nuclear fusion - meaning is is technically no longer a star, but rather a stellar remnant - it has no means of sustaining its surface temperature.
After its creating it is still hot and therefore glows like the embers of a dying fire, but over time it will cool. Eventually becoming a black dwarf when the temperature of the stars gets so low that it is no long giving off radiation.