>>11244982It literally happens every day, and in the case of single celled life it even happens uncountable trillions and trillions of times.
Take darwin's finches, for example. Charles Darwin studied finches in the galapagos which lived in separate pockets on different islands. Each of these islands had different sources of food (seeds, nuts, etc.) and the populations on each island generally had differently-shaped beaks. What Darwin had observed was the beginnings of speciation. At some point in the past these birds had been able to reach each island, and then something occured to deincentivize or make impossible travel between them. Each island, with its own unique food supply, served as distinct selection criterion for the original bird species.
If island A has lots of small seeds and island B has large seeds that are hard to crack open, then a finch which has been born with an abnormally larger and sturdier beak than either of its parents would have been selected by island A to have a harder time picking up all the little seeds. It would thus be less likely to get lots of nutrients, and less likely to reproduce.
That same mutation, if it occurred on island B, would actually result in the Finch being selected to be more equipped to its environment and thus more likely to survive/pass on genes. Over thousands and thousands of generations, the two local environments' distinct and unique requirements for what is needed to survive thus slowly shape the original bird population into multiple distinct types. This process is called speciation.