To form a star in a nebula, molecular gases clump together under gravity. If enough gas accumulates in these clumps, the gravity becomes so intense that nuclear fusion occurs.