Battered by asteroid impacts, the young Earth was hot and unstable for hundreds of millions of years.