Answer:
Asteroids and comets formed some 4.6 billion years ago after a giant cloud of gas and dust collapsed and condensed to create the sun. The leftover debris orbiting the sun coalesced into planets, moons, and other objects. Asteroids and comets are the remnants of this process.
Asteroids are the rocky remnants of material leftover from the formation of the solar system and its planets approximately 4.6 billion years ago. The majority of asteroids originate from the main asteroid belt located between Mars and Jupiter, according to NASA.
Most comets originate in a vast cloud of ice and dust that surrounds the solar system. The Oort Cloud, as it is called, extends several thousand times farther from the Sun than Pluto, the outermost planet.
Most meteorites found on Earth come from shattered asteroids, although some come from Mars or the Moon.