Answer:
When the inside of the Earth was liquid, gravity caused the heavier elements nickel and iron to sink to the center. Lighter elements floated to the surface. Over time this process caused the Earth to separate into layers.
Step-by-step explanation: