The majority of dinosaurs were peaceful, plant-eating creatures that developed the Earth's first strong social communities.

Herds, packs and families of dinosaurs were commonplace. Many fossils have been found where groups of dinosaurs died together, such as the ones which sank in the quicksand off the Isle of Wight. In Alberta, Canada, a mass grave has been discovered containing at least 300 grazing dinosaurs of all ages and sizes. This herd was swept to death by a flash flood while trying to cross a deep river. In Montana, in the USA, an even bigger herd of about 10,000 dinosaurs has been discovered. These creatures were poisoned by volcanic gases and buried in ash. Their fossilised bones stretch out in a straight line for more than a mile.

Modern understanding of how dinosaurs lived together was transformed by a fossil specialist called Dr Jack Horner, who made a most extraordinary discovery in the mid-1970s. Horner and his team were fossil-hunting in Montana when they came across America's first dinosaur nesting site. They found a number of dinosaur eggs as well as the fossilised remains of baby dinosaur embryos. They called these creatures Maiasaura, which means "good mother lizard". Each season Maiasaura returned to the same breeding grounds where they refurbished their old nests. These dinosaurs lived in colonies and looked after their young in herds until they were old enough to start families of their own. Here, beyond all reasonable doubt, lie the origins of the family unit. More than 200 dinosaur-egg sites have now been found across the world. The eggs range in size from as small as a pebble to as big as a football.

Download the new Independent Premium app Sharing the full story, not just the headlines

Other dinosaur-like creatures, too numerous to mention, also lived through these times. The pterosaurs were enormous flying reptiles that dominated the prehistoric skies. One of them holds the world record for biggest wingspan of any creature ever to have lived. At nearly 20m across, its wings were as large as those of a Second World War Spitfire.

A mystery of feathered flight: where did the world's first birds come from?

Hermann von Meyer, a German fossil-hunter, thought he'd got the answer to this puzzle in 1861 when he announced the discovery of what he claimed was the first ever bird. He called it Archaeopteryx. It was about the same size as a modern magpie, and was definitely bird-like. Its feathers were arranged in just the same way as modern birds', with an aerodynamic configuration to make flight possible. It even had bird-like claws on its legs, and a wishbone.

Von Meyer's fossil dated back some 140 million years, at about the same time that the first flowers were beginning to bloom ( see Part 2). Since then, a further 10 Archaeopteryx specimens have been found in a region of Germany called Solnhofen. But for years a mystery remained. From what did these creatures descend, and how did they learn to fly? So perplexing was this puzzle that the birds were shunted into their own separate group, neither reptiles like the dinosaurs, or mammals like man. They were just, well, birds.

Then, in 1995, Chinese scientists announced that they had dug out a fossil which proved conclusively that some dinosaurs did indeed have down-like feathers. Sinosauropteryx caused a sensation. It was a small, 1.5m-long, two-legged dinosaur with the jaws and flattened teeth typical of meat-eating dinosaurs. It had clawed fingers, and its hind limbs show that it must have been a fast runner. At last, the puzzle of where birds descended from seemed to have been solved. They are indeed the last and only surviving branch of the dinosaurs. But this still left several perplexing questions unanswered.

Sinosauropteryx feathers show no signs of the aerodynamics needed for lifting a body into the air. It couldn't fly. So what were its feathers for? Experts began to think that perhaps feathers were not originally intended as equipment for flight at all. Perhaps it was only later, by some freak or accident, that they became adapted for the purpose. Small dinosaurs may have developed feathers as a way of keeping warm – a form of insulation.

Feathers are now thought to have been common on all kinds of dinosaurs. The reason this has only recently come to light is that feathers are not normally preserved in fossils.

Lots of dino-birds have now been discovered in China's treasure trove of fossils and bones. One of the most famous is Dave, the fuzzy raptor, unearthed in 2000. He was covered from head to tail in a coat of fine feathers, although they weren't designed for flight.

The final part of the bird riddle remains unsolved. How and when did they adapt their insulating feathers into wings for flight? Did they jump from the trees after spying a tasty meal from on high, swooping down to snatch their prey? Or did they run along the ground, perhaps trying to escape some other hungry beast, and flap up to safety? No one is certain, although another recent fossil from China's "Pompeii", a microraptor, suggests the "top-down" theory, because it has both the right kind of feathers for flight and the right sort of claws for climbing trees. But just how and when its feathers of flight evolved is still a mystery, whose answers probably lie somewhere in rocks still waiting to be found.