Earth was formed approximately 4.6 billion years ago. It began with single-celled organisms in the Proterozoic eon. This was in the pre-Cambrian period. Before we get any further, let me explain the divisions of time that we'll be using. Eons are the largest division of time, with Proterozoic, Paleozoic, Mesozoic, and Cenozoic falling under it. Eras are the second largest division, and include two or more periods. Periods are the third largest division, and are what epochs are divided into. Epochs are the fourth largest division, and are subdivisions of periods. A simpler way of remembering that is Eon>Era>Period>Epoch.
Towards the end of the Ediacaran era, we start to see more soft-bodied animals. As we move into the Paleozoic eon, shelly marine animals start to diversify, and we see more invertabrates such as trilobites. (Invertabrates are animals without a backbone or skeletal structure, such as jelly fish and crustaceans.) From these animals evolve the first fish, around the time of the Ordovician period. Around this same time, we see the first insects. Not long after, the first amphibians and the first seeds appear on land, occurring towards the end of the Devonian period. From here on, we start to see some of the more familiar creatures, such as Reptiles and Synapsids. From these creatures evolved dinosaurs, which then went extinct by the end of the Cretaceous period.
Paleontologists are able to determine the age of all of these creatures, and the timeline that they fall on, by studying the layers of sediment and rock found in the Earth. The bottom-most layers date back the farthest, while the top-most layers are the most recent. Where the fossils fall in those layers determine their age, which is how scientists date them, and place them in the specific periods that they lived in.