Natural selection acts on heritable variation within populations: individuals with traits better suited to their environment tend to survive and reproduce more successfully, passing advantageous traits to offspring. Over generations, this differential reproductive success leads to changes in allele frequencies and adaptation. Natural selection is the primary mechanism driving evolution and the diversity of life.
From population genetics, you know that populations carry genetic variation — different alleles at many loci — and that allele frequencies can change over generations. Natural selection is the specific mechanism by which allele frequencies change *because some variants improve survival and reproduction in a given environment*. It is not random. Unlike genetic drift, which shuffles allele frequencies by chance, natural selection consistently favors alleles that increase fitness — the relative ability of an individual to survive and produce viable offspring.
The logic of natural selection rests on three conditions that Darwin identified, each of which you can verify empirically. First, individuals in a population vary in their traits — some birds have longer beaks, some shorter; some bacteria divide faster, some slower. Second, at least some of that variation is heritable, meaning it is passed from parents to offspring through genetic information. Third, variation in traits leads to variation in reproductive success — individuals with certain trait values leave more offspring than others. When all three conditions hold, the traits associated with higher reproduction become more common in the next generation. This is not a theory about intent or design; it is a mechanical consequence of differential reproduction acting on heritable variation.
A concrete example makes the mechanism clear. Consider a population of beetles varying in color from light green to dark brown, living on brown bark. Birds that hunt by sight eat more green beetles because they are easier to spot. Brown beetles survive longer and produce more offspring, and their offspring tend to inherit the darker coloration. Over many generations, the population shifts toward darker colors — not because individual beetles change color, but because darker beetles contribute more genes to each successive generation. The population has adapted to its environment through natural selection. If the environment changes — say the bark becomes lighter due to pollution — the direction of selection reverses, and lighter beetles now have the advantage.
Natural selection can take several forms depending on which part of the trait distribution is favored. Directional selection shifts the population mean in one direction (as in the beetle example). Stabilizing selection favors intermediate values and reduces variation — human birth weight is a classic case, where very small and very large babies have lower survival. Disruptive selection favors both extremes over the middle, which can maintain or increase variation in the population and, under the right conditions, lead to speciation. In each case, the principle is the same: heritable traits that increase reproductive success become more common. Over vast stretches of time, this process — repeated across millions of populations encountering diverse environments — produces the adaptation and diversification that account for the extraordinary variety of life on Earth.