Planetesimals are objects of some Km of
diameters that are thought to have formed during the solar
The origin of the Solar System has been tracked by Safronov's theory about 5 billion years ago, when an initial primordial nebula made of gas (mostly hydrogen and helium) and very diffuse dust grains (carbon and silicate) started to collapse gravitationally leading to the formation of a central protostar and of a surrounding, rotating disk structure, made from the material that was not incorporated in the protostar. During this disk phase (that can last up to 100 millions years), the grains of dust grow in size very rapidly (this phenomenon being called accretion) until, after a relatively short period, they form planetesimals. These planetseimals have a composition that depends on the region where they have formed (we find rocky planetesimals in the inner parts and ices in the outer parts) and are the "bricks" of the following formation of the planets. In fact in the last phase, the accretion of planets is possible, due to the impacts between planetesimals that can glue together, forming growing objects with a composition that is still respected by the actual structure of the solar system (where, in the inner parts, wet find rocky planets, while in the outer parts, planets are gaseous).
Asteroids and comets are leftover planetesimals that have not been incorporated into a planet during this period.
see T.S. special issue "The origin of the Solar System" for more information