When Did They Live?
The dinosaurs began to appear around 220 million years ago and lived in the Mesozoic Era. This era was split into 3 subsections called the Triassic, Jurassic and Cretaceous eras and lasted until around 65 million years ago.
Triassic
248-206 million years ago
The Triassic period was the first part of the Mesozoic. In the Triassic all the continents were fused together in one 'super-continent' known as Pangaea, meaning 'one earth'. The climate was moderately humid nearer the beginning of the period, and creatures such as Euparkeria (early reptiles) lived there, but, as the continents moved together the planet was parched of water as there were no oceans separating the continents. There were no ice caps. The main plants were, as trees, conifers and, as vegetation, ferns. The first dinosaurs appeared at this time. Then creatures such as Coelophysis, Eoraptor, Mussasaurus, Plateosaurus and Thecodontosaurus lived on the desert world.
Jurassic
206-135 million years ago
The Jurassic is the second period of the Mesozoic. In the Jurassic, the continents had begun to split up from Pangaea and two new landmasses were formed. Laurasia, in the north, was made up of the modern continents Asia, Europe and North America, and Godwana, in the south, was made up of southern continents such as South America, Africa and Oceania. The climate was quite hot and lush, but most of the trees were still only conifers, and most of the plants ferns. There were still no ice caps at the poles. The dinosaurs grew a lot bigger at this point, and giants such as Brachiosaurus, Diplodocus, Stegosaurus and smaller predators such as Megalosaurus.The giant predator Allosaurus lived, and killed, in this era.
The period received its name from the Jura Mountains between France and Switzerland. Here, rocks from this period were first investigated and studied.
Cretaceous
135-65 million years ago
The Cretaceous is the third and final period in the Mesozoic. It was during this period that the dinosaurs suddenly disappeared from fossil records. Although this was the final period that the dinosaurs lived, new species of dinosaur still evolved. The continents split up and resembled more like the modern configuration of the Earth. Flowering plants and broad-leaved trees evolved nearer the beginning of the period and early insects such as bees and wasps evolved too.

Animation of Pangaea
Citations
Dixon, D (2007) The World of the Dinosaurs. [book] Anness Publishing Ltd, London
Haines, T & Chambers, P (2006) The Complete Guide to Prehistoric Life. [book] Firefly Books, London
Waggoner, B (2002) Time Periods, [internet], UCMP California. Available http://www.ucmp.berkeley.edu/help/timeform.html [Accessed 19th Feb 2008]
Image of Pangaea from wikipedia, public domain.