There is genetic diversity within the population. Random mutation can occur, forming new alleles of a gene. Though many mutations are harmful, in certain environments the new allele may benefit its possessor, leading to increased reproductive success. The advantageous allele is inherited by members of the next generation. As a result, over many generations, the new allele increases in frequency in the population.