The process by which the terrestrial planets grew, increasing their mass by gradually accumulating smaller bodies, called planetesimals.