Inbreeding occurs when mating individuals share a common ancestor that is more recent than would be expected in a randomly-mating population.
Thus, a mating between cousins would entail a common ancestor by two generations –– a mutual grandparent. In a population in which inbred mating is uncommon, any random pair of individuals most probably has a much older common ancestor. Because the common ancestor of an inbred pair is more recent, there is a greater chance that the pair also have alleles in common (see identity by descent). This has the consequence of making many loci homozygous. Note: inbreeding does not directly change the frequency of alleles in the population; it only changes the frequency of genotypes.
Although the exposure of deleterious alleles in homozygotes often creates a loss of fitness in the population, inbreeding is not inherently harmful. It is simply expressing genetic variation that was previously concealed in heterozygote carriers. In populations where inbreeding has been frequent for many generations, deleterious alleles exist at lower frequencies, having been purged from the population by natural selection acting on homozygotes. Nevertheless, inbreeding depression may be responsible for the ubiquity of incest taboo in human populations. Indeed, children produced from matings between human relatives are roughly ten times more likely to express congenital disease.