Its energy is released by the burning of hydrogen in the core. Stars is in stable equilibrium. Its structure can be changes because of changing chemical composition. In the main sequence evolution takes place on a nuclear time scale i.e. longest part of the life of a star.
Due to the extremely high luminosity nuclear time scale of massive star is small. Thus, massive stars evolve faster.
Therefore the massive stars are less abundant because of their shorter main sequence lifetimes, less massive star is found to be highly populated in the HR diagram because of very long nuclear time scale.
If the mass of a star becomes too large, the force of gravity can no longer resist the radiation pressure. Theoretical computations give an upper limit for the mass, is about . The most massive stars observed are claimed to be about .
There is also a lower mass limit of the main sequence star. Stars below never becomes hot enough for hydrogen burning to begin. Their luminosity is because of the burning of deuterium. This energy is rapidly exhausted. These are brown dwarfs having surface temperature less than 2000K. The lower limit for brown dwarf mass is about , the minimum mass for deuterium burning.
If the mass is even lower, the smallest protostars contract to planet like dwarfs. During the contraction phase, they radiate because of the release of Potential energy.
The stars in the upper main sequence are so massive and their central temperature so high that the CNO cycle can operate.
On the lower main sequence, energy is generated by the pp chain.
The energy production in the CNO cycle is very strongly concentrated at the core. The outward energy flux is very high. This flux can not be maintained by radiative transport. Thus the upper main sequence stars have convective core. Outside the core, there is radiative equilibrium. The mass of the convective core gradually diminishes as the Hydrogen is consumed.
In the lower main sequence star, opacity at the surface is high because of the low surface temperature. Radiation can not carry all the radiation because of high opacity (i.e. random walk of photon becomes very slow). Thus, convective energy transfer is preferred at the outer layer. The center region is radiative because of the pp reaction, energy production rate is slow because of very long reaction time of the reaction
The opacity is not so high in the core region. The main sequence phase of stellar evolution ends when hydrogen is exhausted at the center. Then hydrogen begins to burn in the shell surrounding a helium core.
Here is the mass of the Sun.