This is an advance summary of a forthcoming article in the Oxford Research Encyclopedia of Planetary Science. Please check back later for the full article.
Modern observational techniques are still not powerful enough to directly view planet formation, and so we must rely on theory. However, observations do give us two important clues to the formation process. The first is that the most primitive form of material in interstellar space is a dilute gas. Some of this gas is unstable against gravitational collapse and begins to contract. Because the angular momentum of the gas is not zero, it contracts along the spin axis, but remains extended in the plane perpendicular to that axis, so that a disk is formed. Viscous processes in the disk carry most of the mass into the center where a star eventually forms. In the process, almost as a by-product, a planetary system is formed as well.
The second clue is the time required. Young stars are indeed observed to have gas disks, composed mostly of hydrogen and helium surrounding them, and observations tell us that these disks dissipate after about 5 million years. If planets like Jupiter and Saturn, which are very rich in hydrogen and helium, are to form in such a disk, they must accrete their gas within 5 million years of the time of the formation of the disk. Any formation scenario one proposes must produce Jupiter in that time, although the terrestrial planets, which don't contain significant amounts of hydrogen and helium, could have taken longer to build.
To date there are two main candidate theories for producing Jupiter-like planets. The core accretion (CA) scenario supposes that any solid materials in the disk slowly coagulate into protoplanetary cores with progressively larger masses. If the core remains small enough (of the order of an Earth mass or less), it will not have a strong enough gravitational force to attract gas from the surrounding disk, and the result will be a terrestrial planet. If the core grows large enough, and the disk has not yet dissipated, then the planetary embryo can attract gas from the surrounding disk and grow to be a gas giant. If the disk dissipates before the process is complete, the result will be an object like Uranus or Neptune, which has a small, but significant, complement of hydrogen and helium. The main question is whether the protoplanetary core can grow large enough before the disk dissipates.
A second scenario is the disk instability (DI) scenario. This scenario posits that the disk itself is unstable and tends to develop regions of higher than normal density. Such regions collapse under their own gravity to form Jupiter-mass protoplanets. The DI scenario can form a Jupiter-mass object in a very short time: several hundred years. The difficulty here is to bring the disk to a condition where such instabilities will form. Now that we have discovered nearly 3,000 planetary systems, there will be numerous examples against which to test these scenarios.