Even after the major planets in our Solar System
had already formed, planetesimals -- thousands
or millions of them -- still roamed around the Solar System.
Many of them ultimately collided with the major planets.
http://www.psrd.hawaii.edu/Jan01/lunarCataclysm.html
This last rush of relatively large collisions is known as
the Late Heavy Bombardment or the
Lunar Cataclysm. It ended around 3.9 billion
years ago.
This 3.9 billion years number is going to be important
later on in the course.