Smaller stars, like our Sol, may take tens of millions of years to reach it. In the center of the protostar, the heat increases until nuclear fusion begins. The star is now generating its own heat energy, fusing the nuclei of atoms together to make helium from hydrogen. Carbon, and even iron, can be formed inside very hot stars. As these changes take place, energy is released as heat and light.
Most stars fit a predictable pattern.
These stars have predictable lifetimes and are consistent in their energy generation. As you can see, there is a sort of diagonal line of stars going from right to left. These are main sequence stars. About nine out of every ten stars are on the main sequence. Most stars have less mass than our sun.