Stellar evolution starts with the gravitational collapse of a giant molecular cloud.
The protostar phase which is an early stage in the process of star formation is a hypothetical cloud of dust and atoms in space believed to develop into a star. A protostar is formed about a million years after a gas clump from an interstellar gas cloud has started to rotate and form a disk. It is is a large object that forms by contraction out of the gas of a giant molecular cloud in the interstellar medium. The protostar is simply the core of the disk that formed from the clump of gas that was compressed inside the gas cloud.
Protostars with low masses never reach temperatures high enough for nuclear fusion of hydrogen to begin
For a more-massive protostar, the core temperature will eventually reach 10 million kelvin, initiating the proton–proton chain reaction and allowing hydrogen to fuse, first to deuterium and then to helium. The onset of nuclear fusion leads relatively quickly to a hydrostatic equilibrium in which energy released by the core exerts a "radiation pressure" balancing the weight of the star's matter, preventing further gravitational collapse. The star thus evolves rapidly to a steady and stable state, beginning the main-sequence phase of its evolution.