What happens inside an EGG?
When something disturbs the gas and dust cloud (like a supernova blast nearby in space), pockets of higher density develop. They grow larger forming EEG's (Evaporating Gaseous Globules).
Inside an EGG (Evaporating Gaseous Globule) the gas and dust are denser than in the surrounding dust cloud. Gravity acts to pull the gas and dust even more tightly together and to draw in material from the surrounding cloud. Slowly the density builds up.
The center of the globule becomes hotter under the weight of the outer layers. At these high temperatures, the gas molecules move at high enough speeds that collisions are able to break them up into atoms. As temperatures rise even higher, the atoms lose their electrons and become ions. Pressure and temperature continue to build as fresh material is pulled in from the surrounding cloud -- a protostar is formed inside the EGG.
A protostar with too little mass never becomes a star. It becomes a brown dwarf instead and cools slowly to space, radiating away the gravitational energy from its continuing slow collapse.
However, if the protostar has sufficient mass, the density reaches a critical level and the temperature exceeds 10 million kelvins at the center. At this point, nuclear reactions start converting hydrogen to helium and releasing large amounts of energy. The protostar becomes a star and joins the main sequence on the HR diagram.
The gas and dust that are left around the star are either blown away or form a protoplanetary disk, called a "proplyd" from which planets may eventually emerge.