When the earth was first formed thought to be by the big bang theory its crust was cooling so it was covered in magma and volcanoes. The atmosphere wasn't a thing yet but there was lots of carbon dioxide and ammonia and trace amounts of oxygen
The crust started cooling and it rained this is how the oceans formed. All the lightning started life as single celled organisms starting as cyanobacteria and this made other life obtainable by inviting oxygen into the atmosphere. The ozone layer had formed by now and the oxygen was held in. Trilobites also started forming
Later the cyanobacteria evolved into plants capable of going through photosynthesis. All these plants made life sustainable faster and mammals came to be. All this happened while Pangea was a thing.
This is when the dinosaurs and other reptiles started evolving into existence and there was plenty of oxygen in the atmosphere for them to survive.
This era had new animals such as the woolly mammoth. This is the most recent era.
Soon the plate boundaries started acting up specifically the transform boundaries and the divergent boundaries that eventually split the continents into what they are now.
Here we are now with everything evolved and continuously evolving. We know a lot about fossil record, geologic timescale and the law of super position but as of now we can only guess how the earth formed