Dinosaurs are a group of reptiles that lived millions of years ago, during a time period called the Mesozoic Era. They first appeared during the Triassic Period, about 252 million years ago, and went extinct at the end of the Cretaceous Period, about 66 million years ago.