How was the Earth built?

How was the Earth built?