A star is a hot ball of mostly hydrogen gas held together by gravity. In the core, nuclear fusion reactions generate energy by converting hydrogen to helium. This process is called stellar evolution. As the star's fuel is depleted, its structure changes. Stars evolve through different stages over their lifetimes, from main sequence stars to red giants or supergiants and eventually ending as white dwarfs, neutron stars, or black holes depending on their original mass.