Dinosaurs lived during the so called Mesozoic ("Middle life") Era of Earth history which is devided into the Triassic-, Jurassic- and Cretaceous periods which lasted from about 225 to 65 million years ago. So animals that lived before or after that time can't be dinosaurs.
Dinosaurs are reptiles, so fossil animals from the Mesozoic that are not reptiles (as example, fish, birds, mammals and amphibians) can't be dinosaurs either.
Dinosaurs were a rather special group of land-living reptiles. Thus the gigantic sea monsters of the Mesozoic such as plesiosaurs, ichtyosaurs and mosasaurs arn't dinosaurs. And the flying reptiles of the Mesozoic, the pterosaurs also weren't dinosaurs.
Dinosaurs are members of a group of reptiles known as archosaurs ("rulling reptiles") which include well know creatures like crocodiles, the extinct pterosaurs and those well-kown archosaur descendants, the birds as well as other less well-known creatures such as the thecodontians.
Dinosaurs are distinct from other archosaurs in that they are able to walk and run extremely efficiently, their legs are tucked in beneath the body rather than being held out from the sides.
The English naturalist William Buckland published the first scientific account of a dinosaur which he named Megalosaurus in 1824. A year later Gideon Mantell described the teeth and bones of Iguanodon. It was however anatomist Richard Owen who first described the name dinosaurs (meaning terrible lizard) in 1842 after he first coined the name during an anualmeeting of the British Association for the advancement of Science held in Plymouth (England) in1841. Prof. Harry Govier Seeley grouped the dinosaurs into the saurischians and ornithischians according to there hip structure in 1887.
Some Historical Finds
1837 Hermann von Meyer described the German Triassic prosaurupod Plateosaurus.
1856 Joseph Leidy described Troodon from fossil teeth found in Montana, US.
1858 Joseph Leidy named Hadrosaurus the first dinosaurus skeleton to be described from the America's
1861 Hermann von Meyer described Archaeopteryx a bird closely linked to dinosaurs.
1877 Start of the dinosaur war between Marsh and Cope which resulted in major finds such as Apatosaurus and Camarasaurus.
1878 In Belgium miners discovered more than 30 complete skeletons of Iguanodon (1.056 ft) 322 meter below ground.
1884 Joseph Tyrell discovered the first Albertosaurus skull.