A Hertzsprung-Russell diagram is a plot of luminosity versus temperature on logarithmic scales for the known stars. As more and more points were plotted, most of the stars were found to be confined in a band, stretching diagonally from top left to bottom right. This band of stars is called the main sequence. The mass of a star decides where it lies on the main sequence. The nebula starts contracting due to it's own gravity.
Gravitational instabilities cause the cloud to fragment into smaller and smaller pieces.
The outer regions of the fragments are transparent to the passage of radiation and hence experience no rise in temperature. While, radiation from the central core region cannot escape and causes a rise in temperature. It takes tens of thousands of years for the temperature in the core to rise to 10,000 Kelvin and the inner regions become opaque. This is known as the proto-star stage. The surface of the proto-star is called the photosphere.