The asteroids are material left over from the formation of the solar system.
There is a theory that suggests that the asteroid belt is the remains of a planet that was a victim of a massive collision long ago. Nonetheless, they are rocks that never formed into a planet. Actually, if all the asteroids in the asteroid belt were put together, they would form a planet smaller than our moon.
Comets are chunks of rock, dust, frozen gases, and frozen water. They are also known as “dirty snowballs”. Their orbits bring them close to the sun and then very far out again sometimes beyond the orbit of Pluto.
As the comets get closer to the sun, they produce tails. These tails stretch out for millions of miles. When the comet gets close to the sun, the nucleus gets cold. Comets may have brought some of the organic materials needed for life. So without them, we might not have existed.