text: Stars are formed when clouds of mainly hydrogen gas compress due to their gravitational attraction to the point where they are pushed so close together that nuclear fusion begins. Fusion progresses, turning hydrogen into helium, and eventually heavier elements, until fuel for the fusion is expended. At this point, the star collapses under its own weight, and can result in either a supernova or a black hole, depending on its mass.