Genetic changes are random things. They have many causese - cosmic rays, naturally occurring background radiation, proof-reading errors in the way cells generate copies of themselves, and so on.
Evolution has developed a balance - it doesn’t want too many rapid changes, or we’d never get anywhere. But it doesn’t want too few, either. Mutations can be useful, in the right situations.
In most situations, slow incremental steps are the way to go, maximising a species’ chances of leaving descendants to inhabit the world after them. Most mutations are unimportant - or detrimental - to the creatures inheriting them. They die or, if they live, leave fewer offspring than others of their kind.
But mutations are also an insurance policy against the future - essays in probability - to guard against rivals competing for the same turf, or environmental change which might otherwise destroy their habitat. New species don’t appear all of a sudden. There is usually a gradual change, called genetic drift, which slowly carries isolated populations of the same species away from each other, selecting and adapting to their respective ecosystems until the two are no longer able to interbreed or, if
they do, their offspring are sterile.
This is the point where a new species comes into being. Horses and donkeys share a common ancestor quite recent in evolutionary terms.
They’re so close that they can still have offspring, which we call mules, but mules are infertile. Zebras, too, can crossbreed with horses and donkeys, but their foals are also infertile.
If you go back far enough, every living thing on Earth shares a single common ancestor. Successful adaptations are those which help a species to exploit their
environment. The better they are at it, the more offspring they will have.
Natural selection destroys species which don’t fit into their environment - unless they can modify it to support them. Underground dwellers enjoy the protection of their caves and burrows. But there were fewer natural caves of the right size than there were ancestors of rabbits, so those with genes favouring sharp digging claws to enlarge natural hollows - or dig new ones from scratch - left more descendants than those without them.
Adaptation to an environment happens in two quite distinct ways. One is a gradual change in a species already living in a specific environment. Cheetahs have been selected for a very particular pattern of camouflage markings on their bodies, which copies exactly the dappled shadows of grass and tussock on the plains where they hunt.
For such specific markings to evolve, for such fine distinctions to have made enough difference to promote the survival potential of one over another, thousands of generations must have passed in an environment which was almost static, so that even the smallest survival edge can be enough to make a difference.
The second process is quite different - an evolutionary explosion, where small pockets of survivors expand and mutate into a large number of new forms, filling whole continents left vacant after mass extinction events.
Comet impacts, supervolcanoes, runaway global cooling and similar catastrophes cause the collapse of whole ecosystems, ranging across large areas - sometimes almost all - of the Earth’s land and oceans. There is no time to adapt, no time for anything. The effect - caused by acid rain, poisonous gases being released into the atmosphere, gigatonnes of dust being thrown into the atmosphere and blocking the Sun - might last only a few years - the briefest moment in geological time.
But it is enough to demolish the food web and, within a single generation, leave only lifeless, barren continents and oceans.
Returning from near-extinction, those species which do manage to survive find the world suddenly full of ecological possibilities, for which there is little or no competition from other life forms. Their success in these circumstances depends on their ability to expand rapidly and to colonise new terrain.
Mutations are far more common in small populations, due to the poor copying of DNA in closely-related creatures, which we call inbreeding.
But this apparent breakdown of the normally-reliable process of gene coding has a purpose. It too has evolved to allow this to happen, because it means that a small pocket of survivors can adapt rapidly to exploit the new opportunities which suddenly become available.
After each mass-extinction on Earth - and there have been many - identical niches in the ecology are often taken up by new creatures, rapidly evolving from small root populations crawling out of tiny pockets where life has survived. The most notable example of this is the appearance, after the dinosaur extinction, of mammals in customary roles which had previously been filled by the giant reptiles.
Wolves and tigers replaced raptors, giant plains-striding herbivores like the baluchitherium walked - protected by sheer size - in the footsteps of diplodocus, while others like the buffalo of Africa became just as aggressive and territorial a herbivore as the ankylosaurs and stegosaurs before it.