When a protostar rotates, it generates a strong magnetic field which generates a strong protostellar wind (an outward flow of particles into space). Many protostars also send out high-speed jets of gas into space. Usually there are two jets flowing out along the rotation axis of the protostar. Eventually the wind and the jets clear away the extra gas around the protostar and allow the protostar and the disk to come into view.