Having covered a couple of conceptual building-blocks, we can start putting them together and seeing what effects they have.
Through the combination of random variation and inheritance, we know that sometimes children will have new or different genes from those of their parents, but that most of the time they will have very similar genes. Since genes are connected to actual properties of living things, this means that sometimes children will be born with new, different or unusual properties not shared by their parents. Over grand time scales, this leads to diversity, even if the starting population is relatively homogenous. Some people will end up with blue eyes, some with brown; some people will end up with red hair, some with black hair.
Now note that in general, living beings are in competition with each other for resources (human beings count here too, though the competition is much more subtle in modern society; I will deal with this point more in later posts). Survival of the fittest comes into play here, and we know that genetics has an impact on physical properties. Together, this means (for example) that a giraffe with a gene for extra tallness may be able to eat off taller trees that the other giraffes can’t reach, thus surviving and passing on that gene.
Putting those two points together, this leads to an interesting situation. Random variation provides natural diversity, and survival of the fittest trims that diversity so that only the best genetic variants survive. The result tends statistically into what are called “stable strategies“. After some period of time, a combination of genes naturally occurs which produces properties that make the animals particularly well-suited to their environment. They don’t just survive, they begin to thrive. Their offspring may have random variations on this set of genes, but effectively all major variations end up being worse than the original. As such, the same set of near-optimal genes gets passed down stably, generation after generation.