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 the gas and dust are denser than in the surrounding dust cloud. Gravity acts to pull the gas and dust even more tightly together as the EGG continues to draw in material from the surrounding cloud. Slowly the density builds up. As the center of the globule becomes hotter under the weight of the outer layers, 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.
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.