This matter aggregated through gravity and coalesced into what are called proto-planets and potential moons. This is how Earth is formed because the third proto-planet from the Sun was Earth. The earth wasn’t always a magnificent blue marble, with colorful trees rustling in the gusts, with impeccable white sand beaches onto which green waves and foam lapse and disperse into each other.