The disk starts cooling through energy radiation. Depending on the amount and distribution of gas, it can be gravitationally stable, or else be unstable and form one or more new protostars. In such a way, a binary or multiple stellar system is formed. Far from the star, the gas is cold enough so that part of the gas condenses into dust and ice. The dust grains merge due to collisions, until they form small pieces of rock called planetesimals.
Planetesimals merge and form protoplanets.
The maximum size of protoplanets depend on their distance from the star, and on the chemical composition of the primordial nebula. It is much smaller in the inner regions than in the outer regions, since the protostar tends to disrupt and vaporize dust. The difference in size between terrestrial planets and jovian planets supports this scenario. The protoplanet formation requires from about one hundred thousand to some twenty million years. At this time, the star starts emitting a strong wind which sweeps away the residual gas of the disk.