Dinosaurs lived between 220 and 65 million years ago. Although the age of dinosaurs is the Mesosoic Era, (which is divided into three periods - Triassic, Jurassic and Cretaceous), dinosaurs actually first evolved towards the end of Triassic.
Dinosaurs evolved from the ancient archosaurs, so the first dinosaurs were like archosaurs. From there they evolved into two groups - saurischia, and (later) ornithischia. The difference between the two were their hip bones - saurischias were "lizard-hipped", and ornithischias were "bird-hipped".
Sauropodomorpha were long-necked plant eaters with lizard-like feet. They further evolved into two different groups: Prosauropods (massospondylidae, plateosauridae, melanorosauridae and ancisauridae); and sauropods - the largest animals that have ever excisted. They were massive long-necked elephantine plant-eaters which, due to their weight, walked on four legs. They included cetiosaurs, dicraeosaurs, Euheloptidae, Diplodocidae, Vulcanodontidae, and Macronaria (which later developed into titanosaurs).
Ornithischia, the second large group that dinosaurs evolved to, were bird-hipped plant eaters. They evolved into five groups: Ornithopoda, Fabrosauridae, Heterodontosauridae, Thyreophora and Marginocephalia.
Ornithopoda were bird-footed plant eaters that evolved to Hypsilophontidae, and Iguanodontidae which further evolved to hadrosaurs, lambeosaurs, and hadrosaurs (Edmontosaurini, Maiasaurini, Saurolophini, and hadrosaurini).
Thyreophora were armoured dinosaurs, which evolved to spectacular stegosaurs (with plated back), and Ankylosauria, which further evolved into Nodosauridae and Ankylosauridae (Polaxanthidae and Ankylosaurinae).
Marginocephalia were also armoured, but with horns on their heads instead of spikes or plated on their backs. They evolved into two groups: Patchycephalosaurs (boneheads) and Ceratopsia (hornheads), which further evolved into neoceratopsia, ceratopsidae, centrosaurinae, ceratopsinae and chasmosaurini. That's the main lines in dinosaur history.
NOTE: This website is written in British English, which is the English we use in Australia. You will find words like "traveller", "harbour" and "realise", and they are all correct in the language used in Australia.