Inside a nebula, there are areas where gravity causes dust and gas to “clump” together. As these “clumps” gather more and more mass their gravitational pull increases, forcing more atoms together. This process is known as accretion, and the result is a protostar.