Planet formation, the process by which planets form, is not completely understood: theories of parts of the process seem solid, but others are not settled upon, with some parts unexplained. Various theories are promoted, debated and refined, but despite the questions, they are developed in detail sufficient for computer simulation as a means of showing their plausibility and generating statistics and characteristics that might be compared with observation.
The nebular hypothesis is well accepted regarding the source of the material, the gravitational instability model explains the "clumping" of mass necessary to get things started and the core accretion model is a good explanation of how planets grow larger than rocky planets (e.g., giant planets).
The core accretion model is associated with solid cores, assuming material that can become solid, i.e., metals, thus assumes a certain metallicity in the disk and star. Such a tendency can be tested by survey. This is colloquially known as cold start, because it is thought that it would leave significantly less heat in the planet than gravitational instability, which is thus known as hot start, and it is thought to affect the subsequent composition of the planet, which in turn, can be used to determine the planet's formation pattern.
Gravity plays a role in both gravitational instability and in the accretion of gas forming atmospheres. A Keplerian disk is no more than a first approximation, with radiation pressure, gas pressure playing a role, as well as dynamical interaction such as wind shear (WISH). A radius around a growing planet where its gravity dominates is not the same as the Hill radius, but including other affects, is smaller.
The assumption is that dust forms from gas, and combines into small solid bodies of increasing scale up to planet sized. The challenge is to provide plausible means by which growth can continue at each size, and the specific challenges are commonly referred to as "barriers", i.e., places in the growth process where there are seeming impediments to further growth. Some barriers cited include:
Recent models suggest that protoplanetary disks form striae such that dust collects into pebble-size bunches, and that the fluid dynamics of the disk tend to bring these to the forming planets (pebble accretion).
Oligarch theory suggests after a period of rapid growth (i.e., runaway growth), the largest objects (oligarches) grow faster than the rest for some time, eventually throwing many of the smaller objects out of the system and/or consuming them during impacts. Some are thrown into eccentric orbits, risking more impacts, but while the disk exists, the orbits are damped and will tend to circularize. (With no disk, gravitational pumping encourages eccentricity, and thus collisions.) For some time after that, giant impacts could result in merger of some planet-sized bodies (as per the theory of the Moon's origin). Such impacts also push off some of the atmosphere.
Evidence for planet forming theories is sought in the Earth's makeup: e.g., the evidence for a giant impact creating the moon, as well as the phenomenon of Earth's outer layer containing some materials that would be expect to sink toward the center during Earth's early rock-melting-temperature period, suggesting these materials were gained later. There is geochemical evidence that Earth's formation occurred over 100 million years, e.g., from moon rocks and meteorites.
It has been suggested that a relationship between planet's rotation (specifically, its equatorial rotation velocity) and its mass, i.e., on a log-log plot, is a signature of its formation process since all solar system planets fit a relationship that distinguishes them from brown dwarfs. However, these planets have rotation periods in the same order-of-magnitude so the actual relationship shown could be radius versus mass.