A person can't be created overnight, completely ready for the adult world. Humans require time and energy; they need nutrition, stimulation, and attention. Stars are the same way. With humans, the word is 'baby,' but with stars, they start out as protostars.
A protostar is a baby star, an area of material that hasn't yet formed into a fully-fledged star.
Artist Impression of a Protostar. (This is a stage normally obscured by dust.)
The length of a star's childhood depends on how big it is. Larger stars burn brighter, but also have shorter lives (as both protostars and mature stars). Stars with the mass of our own Sun were protostars for around 10 million years.
Creating a Protostar
LH 95 Stellar Nursery in the Large Magellanic Cloud
Like a lot of babies, stars begin by spending a lot of time in nurseries. Not human nurseries, but stellar nurseries.
A stellar nursery is a poetic name for the molecular clouds where stars form. These clouds are what's left after a star or multiple stars have died and released a lot of material to the surrounding area. In the most violent cases, this happens through the explosion of a star known as a supernova. Molecular clouds have hydrogen atoms and they're dense enough that massive molecules can form, as much as 100,000 times the mass of the Sun.
Taurus Molecular Cloud
These molecules are held together by gravity. For a long time, the force of gravity holding them together is balanced by the gas pressure trying to get them to spread apart. But if these forces become unbalanced, perhaps due to a galaxy collision or another supernova, gravity can take over and the cloud can start to collapse on itself. This happens slowly over long periods of time. When a molecular cloud collapses, it tends to break into fragments and each of those fragments will become a protostar. As this collapse happens, the cloud heats up and spins, as gravitational potential energy is changed into kinetic energy.
Molecular Clouds Can Be Beautiful (Part of the Carina Nebula)
Bi-Polar Jets Produced By Protostars
Just like babies, protostars can be beautiful to our eyes, with disks of cloud and bi-polar jets blasting from opposite ends.
The Big Day
Before you know it, it's the big day, the first day at school and out of the nursery. For protostars, this is the day that material is no longer falling towards the center. Before long, the protostar is no longer growing and the excess material nearby has been