When Earth first formed from clouds of dust and gas 4.6 billion years ago, it was devoid of an atmosphere, an inhospitable rock floating in space. But as the young planet is pummelled by asteroids, a period of extraordinary upheaval begins.