General Astronomy/Formation of the Solar System
The planets started out as planetesimals. These objects were drawn together by gravity, to form the large masses that would become planets. The initial collisions of planetesimals melted the surface of the emergent planets. As the planets grew, radioactive decay heated and melted the interior.