When Earth first formed around 4.5 billion years ago, it was a ball of molten rock. Over time, heavier elements, like iron and nickel, sank to the planet's center, forming the Earth's early core.