At the most basic level, mass extinctions reduce diversity by killing off specific lineages, and with them, any descendent species they might have given rise to. In this way, mass extinction prunes whole branches off the tree of life. But mass extinction can also play a creative role in evolution, stimulating the growth of other branches.
The sudden disappearance of plants and animals that occupy a specific habitat creates new opportunities for surviving species. Over many generations of natural selection, these lineages and their descendent lineages may evolve specializations suited to the newly freed up resources and may take over ecological roles previously held by other species, or may evolve brand new ecological strategies. In this way, mass extinction can level the evolutionary playing field for a brief time, allowing lineages that were formerly minor players to diversify and become more prevalent. By removing so many species from their ecosystems in a short period of time, mass extinctions reduce competition for resources and leave behind many vacant niches, which surviving lineages can evolve into. For example, mammals have been around for more than 200 million years — but for most of that time, they’ve remained a small group of rodent-like organisms. It was only when the non-avian dinosaurs went extinct 65 million years ago in the end-Cretaceous mass extinction, that mammals really diversified. In less than 20 million years, they evolved into the great variety of mammals we know today — forms that play many of the same roles in terrestrial ecosystems that their dinosaur predecessors had.
Learn more about adaptive radiations, in which a lineage rapidly diversifies and the newly formed lineages evolve different adaptations.