Polymorphism represents another level of specialization, above the level of cell, tissue, and organ specialization found in individuals, and below the species level.
It refers to specialization of individuals within a species.
When is specialization by polymorphism better than just having general-purpose individuals?
What kinds of specialization are advantageous for a particular species?
What regulatory mechanisms produce the specialized individuals and regulate the relative numbers?
How does polymorphism evolve? This question is especially relevant because polymorphism usually involves differences in reproductive performance.

Three types of polymorphism:

1) Sexual dimorphism : The most familiar example of polymorphism.

Genetic mechanisms for differentiating males and females. It can be shown theoretically that, if the costs of raising male and female offspring are equal, natural selection will maintain a 1:1 sex ratio. This is an inherent property of a genetic mechanism, which cannot be overcome, even if each male is capable of mating with many females and thus the reproductive rate of the species could be increased by having a high female:male ratio.

Non-genetic mechanisms:
Environmentally determined sex
This appears to be advantageous when an organism's environment is patchy and the organism is located at random. I.e., larvae settle down at random and then "choose" the sex that will give the higher probability of successful reproduction in that particular environment.(Charnov & Bull, Nature 266:828,1977)
The classic example is the Echiuroid worm, Bonellia . (Giese & Pearse, Invert. Reproduction Vol. III) When a planktonic larva settles down on the normal mud substrate, in isolation, it develops into a female. If the larva happens to find a female worm first, it enters the coelomoduct of the female, differentiates into a male, and lives there as a parasite. The male is very rudimentary, and essentially just becomes a male gonad, nourished by the female, that produces spermatozoa to fertilize the eggs produced by the female. Of course, it differs from a typical male gonad in having a different genotype from the rest of the animal, so the advantages of sexual recombination are preserved. (May be up to 20 males in one female.) (Have been some experiments showing that female extracts can cause larvae to develop as males.)
Other examples are found in some parasitic isopods, parasitic wasps, some orchids.

Sequential hermaphroditism: (sex change)
An example is Labroides , a small fish living in coral reefs. This lives in family groups containing 1 male and 6 to 8 females. If the male dies, or otherwise becomes ineffective, a female transforms into a male as a replacement. This is accomplished in about 2 weeks after experimental removal of a male from a group. If a family group grows too large by addition of younger fish, another female transforms into a male, and the group splits into two families.
The group structure is maintained by aggressive behavior, or what is sometimes called "pecking order". The male acts aggressively towards the largest female and dominates her, and this suppresses secretion of the hormones that cause transformation to a male. The largest female similarly dominates the next largest females, etc. -- so it will normally be the largest female that becomes male after removal of a male. This is a sensible solution to competition among males that are able to mate with many females. It is a better strategy for a small fish to remain female and be assured of successful reproduction rather than to try to be male and risk losing the competition to a larger male and not reproducing at all. (Ovaries of females contain inactive spermatogenic tissue. Males can retain spermatogenesis even if isolated.) (Robertson, Science 177:1007-9,1972)
There are other examples in coral reef fish.
Another classic example is the slipper limpet, Crepidula .
(Sex determination in vertebrates: only in non-mammalian vertebrates is the functional sex determined by hormones. In mammals, gametogenesis is strictly controlled by genetic sex, and hormones only control the secondary sexual characteristics.)

2) Sexually vs. asexually reproducing individuals

Rotifers are a pseudocoelomate phylum of small(<1mm), multicellular organisms. Typically use cilia to collect food particles, and live in niches rather similar to those of some ciliated protozoa such as Stentor .

In one of the major classes of rotifers, two kinds of females are found:
amictic females produce diploid eggs that do not need to be fertilized. All of these eggs develop into females.
mictic females produce haploid eggs.
There are some minor morphological differences between these two polymorphic forms.

When haploid eggs are fertilized, they develop into amictic females.
An unfertilized egg will eventually develop into a male.
This mechanism of sex determination is known as haplodiploidy . This is a very efficient reproductive situation, because males are produced only in the minimal numbers required for fertilizing the eggs. In rotifers, the males are usually small, and sometimes do not feed and grow beyond the size determined by resources in the egg, but they can produce spermatozoa.

When both sexual and asexual reproduction are possible, why should an individual choose to reproduce sexually? This is a general question, but usually the possibility of a choice is not as clear as it is in these rotifers. A priori, asexual reproduction would appear to be the preferred strategy for maximizing the number of individuals carrying the same genes as the parent -- which is what we expect natural selection to enforce. (In a population of sexually reproducing animals in a steady state, the net effect of reproduction by a female will be to produce two reproductive adults in the next generation; each of these has only a 50% chance of carrying a particular parental gene. If one of these females chooses to reproduce asexually, the net effect will probably still be production of two reproductive adults in the next generation, but each of these will have a 100% chance of carrying a particular parental gene. Therefore we might expect a gene causing asexual reproduction to increase in frequency until the entire population was reproducing asexually.)
The most popular answer to this question is the following: (Williams & Milton, J. Theor. Biol. 39: 545, 1973)
Sexual reproduction, which increases variability among an individual's descendents, is advantageous when the future environment is unpredictable

These rotifers live in small ponds or pools that have a transient existence and vary greatly in characteristics. If an individual succeeds in reaching reproductive size, it is probably well adapted to that particular habitat, and if the habitat remains the same the best reproductive strategy is to produce identical offspring, by reproducing asexually. However, at the end of the season, or if the pond dries up, the best strategy is to produce offspring with maximum variability, to increase the chance that some of them will be successful in whatever environment they find in the future. Mictic females are usually produced at the end of the summer, and the fertilized eggs are usually more resistant to dessication and more likely to survive until they can develop in a new pond.
How do the rotifers know that the future will be unpredictable? In one species, it is known that the differention of mictic females can be induced by vitamin E (a tocopherol), which is more likely to be in a diet of plants than in a diet of small animals.
In the case of rotifers, the fact that haplodiploidy is so efficient decreases the genetic "disadvantage" of sexual reproduction. This may be significant in maintaining the coexistence of the two forms of reproduction. However, sexual reproduction may be lost completely if its advantages are not continuously selected for. In fact, there is a major group of rotifers in which only females are known. (Similarly, there are quite a few species of parthenogenetic fish.)
The coexistence of sexually and asexually reproducing forms in a free-living animal, as in rotifers, is unusual, and may be correlated with the determination of sex by haplodiploidy in these animals. However, it is also encountered in the life cycles of Hydrozoan coelenterates, where sexual reproduction produces dispersed larvae and asexual reproduction enlarges the local population with identical individuals. This pattern of course is also common in plants. Even more common is the presence of both sexually and asexually reproducing forms in the life cycles of parasitic animals. In these cases, continued reproduction on or in a particular host is usually asexual, giving the maximum rate of reproduction of individuals adapted to that host. Sexual reproduction usually occurs when it is appropriate to produce individuals that will find and infect new hosts. In this process, variability is probably an advantage. Examples: aphids, Trematoda, and many others.

3) Reproductive vs. non-reproductive individuals in colonies (superorganisms)

Anthopleura elegantissima is the small sea anenome common in sheltered environments along the Southern California coast. It normally grows in colonies of up to several hundred closely-packed but separate individuals, all of the same sex and color patterning. Each of these colonies appears to be a clone resulting from asexual reproduction starting from one individual. Adjacent colonies are separated by clear zones. When individuals from two different clones contact each other, they fight. They use their nematocysts, especially large nematocysts on club-like projections from the side of the column, called acrorhagi. They can damage and kill the anenomes that they attack. Obviously, these primitive animals must have a self-nonself recognition mechanism. It seems to be limited in diversity, because clones that are separate but compatible are not difficult to find.
Polymorphism: Individuals at the center of the colony develop gonads and reproduce sexually. Individuals at the periphery develop acrorhagi and expose themselves to danger of combat, and do not reproduce sexually. This is an example of altruistic behavior. How can natural selection lead to evolution of a non-reproductive, self-sacrificing individual? In this case the answer is provided by the fact that all the individuals in the clone have the same genotype, so that reproduction by the central individuals propagates the same genes as would reproduction by the peripheral, non-reproductive individuals. So, genes favoring the differentiation of polymorphic forms will be selected favorably if polymorphism increases the reproduction of the colony as a whole. In such cases, the unit in natural selection is not the individual anemone, but instead it is the whole colony -- which should therefore be considered the unit that we have previously called the organism. In these cases, the term superorganism is sometimes used.

Many other examples of superorganisms can be found in the Cnidaria. Usually, the asexually produced individuals are not entirely separate, and often retain a continuous coelenteron, so that there is cooperation between feeding and non-feeding individuals. In the most elaborate cases, such as the Siphonophores, there may be as many as 7 distinct polymorphic forms.

The social insects are the most prominent examples of superorganisms. They are found in two orders of insects: Isoptera (termites), which have typical sexual reproduction, and in Hymenoptera (ants, bees and wasps), which have haplodiploid sex determination.
The general structure of these superorganisms is that there is one (or very few) reproductive female, small numbers of reproductive males, and large numbers of non-reproductives that provide food and care for the reproductives and the early developmental stages. In termites, there are both male and female non-reproductives; in Hymenoptera the non-reproductives are females.
In most of these superorganisms, reproductives and non-reproductives are genetically identical, and environmental factors control the development, usually by suppressing the developmental capabilities of reproductives. In most cases, there are safety mechanisms that allow the superorganism to recover from loss of a reproductive.
In termites, and some Hymenoptera, the superorganism reproduces by sending out individual reproductives (like gametes) which can mate and maybe form a new colony. In honey bees (Apis mellifera ), and many other Hymenoptera, the superorganism reproduces by splitting into two parts, each with a reproductive female.

Social insects have been intensively studied, but still present many interesting questions. Two examples:
The best known control mechanism: In honey bees, the presence of a queen in the hive is communicated to the workers by pheromones. One of these has been identified as trans-9-keto-2-decenoic acid:

This compound appears to circulate rapidly within the hive, in part by surface contacts between the individuals in the colony. Its concentration in the hive is a measure of the health of the queen. Its concentration may also be influenced by the size of the worker population, possibly involving reduction to an inactive form of 9-Hydroxydecanoic acid by the worker bees, and reoxidation by the queen. This pheromone and other queen pheromones suppress the queen-rearing behavior of the worker bees and inhibit the development of ovaries of non-reproductives. If the queen is suddenly removed, within 1 hour the workers respond by transferring early larvae to special queen-rearing chambers and feeding them a rich diet consisting primarily of the mixture of secretions and foodstuffs known as "royal jelly". This dietary difference causes the larvae to develop into mature reproductives, so that there will be a replacement queen. The control by diet may involve both the direct effects of nutrional supply and the indirect effects of this enhanced nutrition on hormone secretion by the larvae.
The evolution of social organization has apparently occured independently in different groups of Hymenoptera, perhaps as many as 12 different times. It is believed to be favored by haplodiploidy for the following reason:
In typical sexually reproducing species, an individual shares 1/2 of its genes with each of its offspring. It will also have 1/2 of its genes in common with its full siblings. It might be equally advantageous to perform behavior that would favor the survival and reproduction of siblings, rather than reproducing. However, this is only true if the individual can correctly identify its siblings; usually it is easier to identify individuals as one's own offspring.
With haplodiploidy, since the males are haploid, all of the sperm from a male are identical. Each worker will share 3/4 of her genes with her full sisters (other workers and reproductive females that are daughters of the queen and the same male). This means that the best strategy for an individual worker to follow to propagate her own genes is not to reproduce herself, but to promote the reproduction of reproductive females from eggs laid by the queen.
Although this argument will be weakened if the reproductive female has mated with more than one male, it is generally considered to be a strong enough argument to explain the repeated evolution of social organization in the Hymenoptera.
There are a lot of other interesting complications.

For further reading I recommend a book by T. Seeley (1995) called "The Wisdom of the Hive" (QL568.A6 S445), especially Chapter 10.