Exploratour - Evolution of the Solar System
In the picture, the proto-sun is shown at the top, and the temperature in the nebula is shown to decrease with distance away from the proto-sun, towards the bottom of the drawing.
The temperature at which ice begins to form solid material is the freezing temperature, near 250 K on the diagram. The temperature at which rocky materials, of which the terrestrial planets are made of, such as Calcium, Magnesium, Iron, Nickel, and Lead, can begin to form solid material, is much higher.
Thus solid material condensed close to the proto-sun, and formed the terrestrial planets. Solid material also condensed in the middle of the nebula, near the proto-Jupiter, but Jupiter also drew ice and many of the very simple gases from the nebula. The gaseous material which Jupiter drew from the nebula stayed, while the gaseous material which the terrestrial planets drew from the nebula probably drifted away.
This is page 8 of 20