About 230 million years ago--give or take a few million years--the first dinosaurs evolved from the archosaurs, the "ruling lizards" that shared the earth with other families of early reptiles, including therapsids and pelycosaurs. As a group, dinosaurs are defined by a host of (mostly obscure) anatomical features, but to simplify matters a bit, the main thing that distinguished them from their archosaur forebears was their erect posture (either bipedal or quadrupedal), as evidenced by the shape and arrangement of their hip and leg bones. (See a gallery of early theropod pictures.)
As with all such evolutionary transitions, it's impossible to identify the exact moment when the first dinosaur walked the earth: for a few million years during the middle Triassic period, some reptile species would have evinced a confusing mixture of archosaur and dinosaur characteristics. For example, the two-legged archosaur Marasuchus (sometimes identified as Lagosuchus) looked remarkably like an early theropod dinosaur, and along with genera like Saltopus and Procompsognathus may well have inhabited that in-between "shadow zone" that has proven so baffling to paleontologists. (The recent discovery of a new genus of archosaur, Asilisaurus, may push back the dinosaur family tree even further, to 240 million years ago; the implications of this are still being sorted out, as are the implications of dinosaur-like footprints in Europe dating as far back as 250 million years ago!.)
South America - Land of the First Dinosaurs
Over the past few decades, the earliest of what have been conclusively identified as the first true dinosaurs have been found at fossil sites in South America. Until recently, the most famous of these were the relatively large (about 400 pounds) Herrerasaurus and the medium-sized (about 75 pounds) Staurikosaurus, both of which lived about 230 million years ago and seem to have been genuine theropods. Most of the buzz has now shifted to Eoraptor, discovered in 1991, a tiny (about 20 pounds) South American theropod whose plain-vanilla appearance would have made it a perfect template for later dinosaur specialization (by some accounts, Eoraptor may actually have been ancestral to sauropods rather than more advanced theropods).
(A recent discovery may overturn our thinking about the South American origin of the first dinosaurs. In December of 2012, paleontologists announced the discovery of Nyasasaurus, which lived in a region of Pangaea corresponding to present-day Tanzania, in Africa. Shockingly, this slim dinosaur dates to 243 million years ago, or about 10 million years before the putative first South American dinosaurs. Still, it may yet turn out that Nyasasaurus and its relatives represented a short-lived offshoot of the early dinosaur family tree.)
These three early theropods spawned a hardy breed that quickly (at least in evolutionary terms) radiated out to other continents. The first dinosaurs quickly made their way into North America (the prime example is Coelophysis, hundreds of fossils of which have been found at Ghost Ranch in New Mexico) and a recent discovery, Tawa, which has been adduced as further evidence for the South American origin of dinosaurs. Small and medium-sized theropods soon made their way to eastern North America (Podokesaurus), then onward to Africa and Eurasia (for example, the western European Liliensternus).
The Specialization of the First Dinosaurs
Theropod dinosaurs accounted for a small (but disproportionately popular) percentage of all the dinosaurs that ever lived; over the Jurassic and Cretaceous periods, these two-legged meat eaters radiated out into tyrannosaurs, raptors, dino-birds and a bewildering array of large theropods (such as Spinosaurus and Allosaurus). What about the herbivorous dinosaurs, which well outnumbered their carnivorous counterparts?
Here's where things get a bit more complicated. Technically, theropods are saurischian ("lizard-hipped") dinosaurs, a group that also included the giant, plant-eating sauropods of the late Jurassic and Cretaceous periods. These sauropods were preceded by the prosauropods (also known as "sauropodomorphs"), some of which looked remarkably like early theropods. The prosauropod family tree begins about 220 million years ago; early genera like Efraasia and Camelotia remain somewhat mysterious, but the breed is better attested to a few million years later with dinosaurs like Plateosaurus and Sellosaurus.
As for the ornithischian ("bird-hipped") dinosaurs--a family that includes ornithopods, hadrosaurs, ankylosaurs and ceratopsians--they can trace their ancestry all the way back to Eocursor, a small, theropod-like dinosaur from late Triassic South Africa. Eocursor itself would have ultimately derived from an equally small South American theropod, probably Eoraptor, that lived 20 million or so years earlier--demonstrating how the vast diversity of dinosaurs could have originated from such a humble progenitor.
The following is a list of the earliest theropod dinosaurs of the Triassic and Jurassic periods; just click on the links for more information.
Chindesaurus This theropod was a close relative of Herrerasaurus.
Coelophysis This early theropod has yielded hundreds of fossils.
Coelurus This tiny dinosaur was a close relative of Compsognathus.
Compsognathus A chicken-sized theropod of the late Jurassic.
Daemonosaurus This "evil lizard" was a close relative of Coelophysis.
Elaphrosaurus A lightweight theropod of the late Jurassic.
Eodromaeus Yet another ancient theropod from South America.
Eoraptor This tiny dinosaur was one of the first of its kind.
Gojirasaurus This early dinosaur was named after Godzilla.
Herrerasaurus This small carnivore roamed present-day South America.
Liliensternus One of the largest carnivores of the Triassic period.
Lophostropheus This theropod lived near the Triassic/Jurassic boundary.
Megapnosaurus Its name is Greek for "big dead lizard."
Pampadromaeus This "Pampas runner" was ancestral to sauropods.
Podokesaurus One of the earliest dinosaurs of eastern North America.
Procompsognathus Was it an archosaur, or an early dinosaur?
Saltopus Experts can't decide if this was a dinosaur or an archosaur.
Sanjuansaurus An early theropod from South America.
Sarcosaurus This "flesh lizard" roamed early Jurassic England.
Segisaurus An early dinosaur closely related to Coelophysis.
Shuvosaurus Was it an early dinosaur, or a two-legged crocodile?
Staurikosaurus Another primitive theropod of the Triassic period.
Tanycolagreus A small, mysterious theropod of the late Jurassic.
Tawa This theropod points to a South American origin for dinosaurs.
Zupaysaurus This "devil lizard" was one of the earliest theropods.