A star begins as a collapsing cloud of material made mostly of hydrogen, with helium and tiny amounts of heavier elements. Once the stellar core is dense enough, some of the hydrogen is changed into helium through nuclear fusion. The energy moves away from the core by a combination of radiation and convection. The star's radiation stops it from collapsing further under its own gravity. Once the hydrogen fuel at the core has been used up, those stars with at least 0.4 times the mass of the Sun expand to become a red giant.<ref name=""late stages"">{{cite web