Mantle - 2900 km thick. Core - 3400 km thick. No recent hypothesis. Thought that planetesimals form by accretion of condensed clumps of silicon. Accreted material attracted to other accreted material by the force of gravity.
Compression provides heat.
Further infalling chunks of material convert energy of motion to heat energy. Finally radioactivity generates additional heat. All three combine to heat Earth to the melting point. Looking at the Crust Bedrock - Solid outcropping bodies of rock. Example is the San Gabriel Mountains.