The Earth formed about 4,600 million years ago. It started out as huge clouds of swirling gas and dust.