Stars are formed from the collapse of giant clouds of dust and gas in space. As the cloud collapses due to gravity, it heats up and eventually nuclear fusion begins in its core, forming a new star. Stars exist in different colors and sizes depending on their mass, with more massive stars being hotter, brighter, and having shorter lifespans than less massive stars. Eventually a star runs out of hydrogen fuel for fusion in its core, causing it to expand into a red giant and later die, leaving behind a white dwarf, neutron star, or black hole depending on its original mass.