A 600 year old book may contain the earliest description of
CAVE-like technology.

The disk-shaped nebula around a young star contains all of the
raw materials -- gas and dust -- which can eventually accumulate
into planets. How this matter actuallly ends up in planetary
form is still a matter of debate. Our observational
technology is not good enough yet to allow us to directly view a
planet accreting out of the primordial cloud. Thus our best
explanations for planet formation are driven by the work of
theorists, who use the known laws of physics and computer
simulations, to derive possible models.

The first of these models has a history that traces back to Immanuel Kant and Pierre-Simon Laplace, and is commonly refered
to as the nebular hypothesis. However here I'm calling it by
the more descriptive slow and steady: planets
cobble together slowly, starting from microscopic dust grains which
grow into hierarchically larger and larger building blocks.

As they orbit around their parent star, grains collide and
stick, growing into pebbles.

These pebbles can aggregate into gravel, then rocks, then
boulders, and so on, until you get to planetesimals kilometers, and
then hundreds of kilometers across. There is still
considerable debate about the details of the various steps in this
process -- imagine collisions between rocks with such ferocity that
they are more likely to disintegrate them into smithereens than
they are likely to stick together.

And for planetesimals many kilometers across, gravity between
these growing masses become important. Instead of their
motions being dominated by the gravity of the central star
dominating (which keeps all of the material in the disk in orbit
about the star), planetesimals grow large enough that they begin to
be drawn to each other. This can lead to a massive
proto-interplanetary game of billiards with massive rocks colliding
with each other, debris scattering, and then drawn back in by the
gravity of the dominant masses.

Over time, the most largest of the rocky cores become massive
enough that they pick up the gas in the protoplanetary
nebula. (The make-up of this nebula is the same as that of
the parent star: roughly 75% hydrogen and 25% helium by mass, and a
few percent for all of the other elements in the periodic
table.) The most massive cores become even more massive as
they accrete the abundant gas. This makes them accrete even
faster, which eventually leads to a feedback loop resulting in
runaway accretion. The new gas giant planet
sweeps up most of the matter in its immediate vicinity.

Based on computer simulations, this process for building planets
can take tens to hundreds of millions of years, and hence the "slow
and steady" moniker from earlier.

A completely different process was proposed in 1997 by
astronomer Alan Boss at the Carnegie Institution in Washington
DC. For a protoplanetary disk that started out with
sufficient mass, it is possible for for part of the disk to become
unstable: Through random motions some of the gas pools
together at a point in the disk, which increases the gravitational
attraction of that location. More gas gets drawn in, and this
leads to a runaway effect again. A "gravitationally
instability" grows, and without seeding by a accreting solid core
like in the first planet building technique, the gas collapses
quickly into a gas giant. This can happen in a million years,
which may seem long by our standards but is relatively quick on a
solar system timescale.

Since Boss first announced his idea, there has been theoretical
modeling that has been done by him and others. There is also
continued debate about the details of both of these techniques for
explaining planet formation.