Polymorphism  in biology is when two or more clearly different phenotypes exist in the same population of a species. The words forms or morphs are sometimes used.

Polymorphism is common in nature. The most common example is sexual dimorphism, which occurs in many organisms. 
Another example is sickle-cell anaemia.

In order to be classified as such, morphs must occupy the same habitat at the same time and belong to a population with random mating.

The switch 
The mechanism which decides which of several morphs an individual displays is called the switch. This switch may be genetic, or it may be environmental. Taking sex determination as the example, in man the determination is genetic, by the XY sex determination system. In Hymenoptera (ants, bees and wasps), sex determination is by haplo-diploidy: the females are all diploid, the males are haploid.

However, in some animals an environmental trigger determines the sex: alligators are a good example. In ants the distinction between workers and guards is environmental, by the feeding of the grubs. Polymorphism with an environmental trigger is called polyphenism.

The polyphenic system does have a degree of environmental flexibility not present in the genetic polymorphism. However, such environmental triggers are the less common of the two methods.

Genetic polymorphism 
Since all polymorphism has a genetic basis, genetic polymorphism has a particular meaning:
 Genetic polymorphism: two or more distinct forms at the same time and place. The proportion of the rarest form must be above mutation rate (and so it is supported by selection of some kind).

The definition has three parts: a) sympatry: one interbreeding population; b) discrete forms; and c) not maintained just by mutation.

Genetic polymorphism is actively and steadily maintained in populations by natural selection. This contrasts with transient polymorphisms where a form is progressively replaced by another.

By definition, genetic polymorphism relates to a balance or equilibrium between morphs. The mechanisms that conserve it are types of balancing selection.

Balancing selection 
Heterosis (or heterozygote advantage): "Heterosis: the heterozygote at a locus is fitter than either homozygote".
Frequency dependent selection: The fitness of a particular phenotype is dependent on its frequency relative to other phenotypes in a given population. Example: prey switching, where rare morphs of prey are actually fitter due to predators concentrating on the more frequent morphs.
Fitness varies in time and space. Fitness of a genotype may vary greatly between larval and adult stages, or between parts of a habitat range.
Selection acts differently at different levels. The fitness of a genotype may depend on the fitness of other genotypes in the population: this covers many natural situations where the best thing to do (from the point of view of survival and reproduction) depends on what other members of the population are doing at the time.

Examples

Humans

Sickle-cell anaemia 
Such a balance is seen more simply in sickle-cell anaemia, which is found mostly in tropical populations in Africa and India.

An individual homozygous for the recessive sickle haemoglobin, HgbS, has a short expectancy of life. The life expectancy of the standard haemoglobin (HgbA) homozygote and also the heterozygote is normal (though heterozygote individuals will suffer periodic problems).

The sickle-cell variant survives in the population because the heterozygote is resistant to malaria and the malarial parasite kills a huge number of people each year.

This is heterozygote advantage, a  kind of balance between fierce selection against homozygous sickle-cell sufferers, and selection against the standard HgbA homozygotes by malaria. The heterozygote has a permanent advantage (a higher fitness) so long as malaria exists; and it has existed as a human parasite for a long time. Because the heterozygote survives, so does the HgbS allele survive at a rate much higher than the mutation rate.

Lactase persistence 
Mammals normally produce lactase only as long as the mother has milk. Then the enzyme lactase is cut off. Modern humans are different.

The human ability to drink milk during adult life is supported by a lactase mutation. Human populations have a high proportion of this mutation wherever milk is important to the diet. The spread of milk tolerance is promoted by natural selection: it helps people survive where milk is available.

Genetic studies suggest that the oldest mutations associated with lactase persistence only reached appreciable levels in human populations in the last ten thousand years. Therefore, lactase persistence is often cited as an example of recent human evolution. As lactase persistence is genetic, but animal husbandry a cultural trait, this is gene–culture coevolution.

Ants 
Ants exhibit a range of polymorphisms. First, there is their characteristic haplodiploid sex determination system, whereby all males are haploid, and all females are diploid.

Second, there is differentiation based mostly on feeding of larvae. This determines, for example, whether the adult is capable of reproduction.

Lastly, there is differentiation of size and 'duties' (particularly of females), which are usually controlled by feeding and/or age, but which may sometimes be genetically controlled. Thus the order exhibits both genetic polymorphism and extensive polyphenism.

Heterostyly 

An example of a botanical genetic polymorphism is heterostyly, in which flowers occur in different forms with different arrangements of the pistils and the stamens.

Pin and thrum heterostyly occurs in dimorphic species of Primula, such as P. vulgaris. There are two types of flower. The pin flower has a long style bearing the stigma at the mouth and the stamens half-way down; and the thrum flower has a short style, so the stigma is half-way up the tube and the stamens are at the mouth.

So when an insect in search of nectar inserts its proboscis into a long-style flower, the pollen from the stamens stick to the proboscis in exactly the part that will later touch the stigma of the short-styled flower, and vice versa.

Another most important property of the heterostyly system is physiological. If thrum pollen is placed on a thrum stigma, or pin pollen on a pin stigma, the reproductive cells are incompatible and relatively little seed is set. Effectively, this ensures outcrossing, as described by Darwin. Quite a lot is now known about the underlying genetics; the system is controlled by a set of closely linked genes; these act as a single unit, a so-called super-gene.ch10p86

All sections of the genus Primula have heterostyle species, altogether 354 species out of 419. Since heterostyly is characteristic of nearly all races or species, the system is at least as old as the genus.

Between 1861 and 1863, Darwin found the same kind of structure in other groups, such as flax (Linum) and in Purple Loosestrife and other species of Lythrum.

Heterostyly is known in at least 51 genera of 18 families of Angiosperms.

Drosophila 
Studies over many years have shown that natural populations of Drosophila are polymorphic for chromosome inversions. The inversions are so common that they must be kept in the population by natural selection.

Related pages 
Evolution
Adaptation
Mimicry
Genetics
Leaf-cutter ant

References 

Evolutionary biology
Classical genetics
Ecology