Dinosaur communities were separated by both time and geography. The 'Age of Dinosaurs' (the Mesozoic Era) included three consecutive geologic time periods (the Triassic, Jurassic, and Cretaceous Periods). Different dinosaur species lived during each of these three periods. For example, the Jurassic dinosaur Stegosaurus had already been extinct for approximately 80 million years before the appearance of the Cretaceous dinosaur Tyrannosaurus. In fact, the time separating Stegosaurus and Tyrannosaurus is greater than the time separating Tyrannosaurus and you.
At the beginning of dinosaur history (the Triassic Period), there was one supercontinent on Earth called Pangea. Many dinosaur types were spread across it. However, as Pangea broke apart, dinosaurs became scattered across the globe on separate continents, and new types of dinosaurs evolved separately in each geographic area.