When the Solar System was formed, there were lots of spare pieces left over. These spare pieces are called asteroids and comets.
Asteroids are lumps of rock, and most of them are found in a region called the Asteroid Belt, which lies between the planets Mars and Jupiter. Meanwhile, comets are lumps of ice, rock and dust, which is why they are sometimes called "dirty snowballs". Most comets are found in the outer regions of the Solar System, further away from the Sun than the planets Uranus and Neptune, in a region called the Oort Cloud.