The formation of stars begins with the collapse and fragmentation of molecular clouds into very dense clumps. These clumps initially contain ~0.01 solar masses of material, but increase in mass as surrounding material is accumulated through accretion. The temperature of the material also increases while the area over which it is spread decreases as gravitational contraction continues, forming a more stellar-like object in the process. During this time, and up until hydrogen burning begins and it joins the main sequence, the object is known as a protostar.
This stage of stellar evolution may last for between 100,000 and 10 million years depending on the size of the star being formed. If the final result is a protostar with more than 0.08 solar masses, it will go on to begin hydrogen burning and will join the main sequence as a normal star. For protostars with masses less than this, temperatures are not sufficient for hydrogen burning to begin and they become brown dwarf stars.
Protostars are also known as Young Stellar Objects (YSOs).