A species is a group of organisms that can interbreed to produce fertile offspring and that shares a gene pool. Evolution is the formation of new species from pre-existing species by changes in gene pools over many generations. Speciation requires one population to become genetically isolated from another, so that gene flow stops.
Allopatric speciation. A geographical barrier — such as a sea, a mountain range or a river — separates two populations, so they cannot interbreed. The environments on either side usually differ, so there are different selection pressures. Individuals with alleles giving an advantage are more likely to survive and reproduce, passing on those alleles, so allele frequencies change differently in each gene pool. Different mutations occur in each population and are not shared, and genetic drift — especially in a small isolated population — changes allele frequencies by chance.
Sympatric speciation. Populations in the same area become genetically isolated without a physical barrier. Ecological separation — for example, using different habitats, food or breeding sites, or reproducing at different times — means they rarely meet to mate. Behavioural separation — for example, differences in courtship behaviour or mate choice — means that even when they meet they do not mate. In each case gene flow is reduced, and selection, mutation and drift again change the gene pools independently.
Reproductive isolation. In both types, over many generations the gene pools become so different — for example, in chromosome structure, courtship or the timing of reproduction — that the populations can no longer interbreed to produce fertile offspring, even if they come into contact again. They are now separate species.
Comparisons of DNA base sequences provide evidence for this: species that share a more recent common ancestor have fewer base differences in the same gene.