Pterosaurs hold a exceptional place in the history of life on earth: they were the first creatures, other than insects, to fruitfully populate the skies. The evolution of pterosaurs approximately paralleled that of their terrestrial cousins, the dinosaurs, as small, basal genuses from the late Triassic period slowly gave way to bigger, more advanced forms in the Jurassic and Cretaceous.
Before we proceed, though, it's significant to address one important issue. Paleontologists have found indisputable evidence that modern birds are descended not from pterosaurs, but from land-bound dinosaurs. This is a paradigm of what biologists call convergent evolution: nature has a way of finding the similar solutions (wings, hollow bones, etc.) to the similar problem (how to fly).
As is the case with dinosaurs, paleontologists don't yet have enough proof to identify the ancient, non-dinosaur reptile from which pterosaurs evolved (the lack of a missing link a terrestrial dinosaur with half-developed flaps of skin--is inspiring to creationists, but you have to memorize that fossilization is a matter of luck. Most prehistoric species aren't represented in the fossil record, simply because they didn't die in conditions that enabled their conservation.)
The first pterosaurs for which we have fossil proof flourished in the middle to late Triassic, about 230 million years before. These flying reptiles were characterized by their little size and long tails, as well as obscure anatomical features (like the bone structures in their wings) that eminent them from the more evolved pterosaurs that followed. These rhamphorhynchoid pterosaurs, as they're sometimes called, contain Eudimorphodon (one of the first pterosaurs known), Dorygnathus and Rhamphorhynchus, and they persisted into the premature to middle Jurassic.
By the late Jurassic, rhamphorhynchoid pterosaurs had been attractive much replaced by pterodactyloids--larger-winged, shorter-tailed flying reptiles exemplified by the well-known Pterodactylus and Pteranodon. With their bigger, more maneuverable wings, these pterosaurs were capable to glide farther, faster, and higher up in the sky, swooping down like eagles to pluck fish off the float up of oceans, lakes and rivers.
During the Cretaceous period, pterodactyloids took after dinosaurs in one significant respect: an increasing trend toward gigantism. In the middle Cretaceous, the skies of South America were ruled by huge pterosaurs like Tapejara and Tupuxuara, which had wingspans of 16 or 17 feet; still, these big fliers looked like sparrows next to the true giants of the delayed Cretaceous, Quetzalcoatlus and Zhejiangopterus, whose wingspans exceeded 30 feet (far bigger than the largest eagles alive today).