The Earth formed about 4.5 billion years ago - almost exactly when the Sun did. The whole solar system condensed out of a giant cloud of gas and dust, with the Sun forming in the center and planets clumping together from leftover material in orbit around it.
For the first 500 million years, Earth was a hellish place: covered in molten rock, bombarded by asteroids, almost completely uninhabitable. Slowly things cooled. Water condensed and oceans formed. About 3.8 billion years ago, the first simple single-celled life appeared - probably in deep-sea vents or warm pools.
Complex multi-cellular life didnβt appear until around 600 million years ago. Dinosaurs ruled from 230 to 66 million years ago. Modern humans are only about 300,000 years old. If Earthβs entire history were squeezed into a 24-hour day, the dinosaurs would only show up at 10:40 PM, modern humans would arrive about 1.2 seconds before midnight, and recorded human history would fit in the last few hundredths of a second. Weβre a recent and brief tenant.