Stars shine bright because of the tremendous amount of energy they are producing continuously. The mechanism of energy production in stars is nuclear fusion, two hydrogen atoms inside the star fuse together creating helium atom and in this process a huge amount of energy is released, the energy is released from the star as light and heat.
Stars like our sun, burn the large amounts of hydrogen present in their core, and convert it into helium. In another 5 billion years, the Sun will have used up all the hydrogen in its core. What will happen to the Sun after that ? It will become a “white dwarf”.
What are white dwarfs? White dwarfs are the remains of stars that have burned out ( that it has used up most of its fuel, hydrogen), the hot gas generated in its core has pushed to come out for millions of years eventually leaving behind the core. This exposed core is a white dwarf. A white dwarf surrounded by the last remains of the expanding gas from its core is a nebula.
White dwarfs are very small and thus very hard to detect. If a star seems to have some sort of unexplained motion, we may find that the single star is not actually alone. A closer observation very often reveals that it has a white dwarf companion. The first white dwarf ever to be discovered was found as a companion star to Sirius, a bright star near the constellation Canis Major. (The great bear) by astronomer Friedrich Bessel in 1844.
The Hubble Space Telescope has helped view more than 75 white dwarfs in one constellation alone. These white dwarfs were so faint that the brightest of them was not even as bright as a 100 watt light bulb seen at the moon's distance (from earth). This constellation called Scorpius where so many white dwarfs were detected, is approximately 14 billion years old, which is why so many of its stars are near the end of their lives.