Melanin is the dark pigmentation which is responsible for the tanning process which occurs in humans when they're exposed to sunlight. In people it is actually a reaction to damage of the skin cells. A melanistic animal has an increased amount of this black or nearly black pigmentation in the skin, feathers, hair, or other outer tissues.
Melanism is the opposite of albinism and occurs with about the same frequency. The genetic basis is not clearly understood, but inbreeding is considered partially responsible.
It is very common in some species, and is bred for in others. For instance, reptile breeders aim for the unusual colours that result from an excess of melanin.
Before industrial revolution, the peppered moth, Biston betularia was dull grey in colour matching with the lichen covered tree trunk. Industrial revolution covered the tree trunk with soot. The grey coloured moths are spotted easily by the predators and eaten. Mutation produced a few black moths. Natural selection increased the number of black moths as they were matching with the soot and not eaten by the predators, while the dull grey moths were eliminated by the predators as they were spotted easily on a black tree trunk. In modern times, when coal was replaced by oil and electricity, the black moths became an easy prey to predators. Again the dull grey forms are coming back in increasing numbers. Considering alleles G and B producing grey and black body colour, the gene pool will contain GG:BG and BB since B allele is dominant over G allel. BB and BG are black. Prior to industrial revolution birds picked up more BG and BB blackmoths than grey moths giving a population predominant of grey moths were selected over the black moths.
In the early nineteenth century, a few all-black variants of this form (called “carbonaria”) had been found by British collectors (the first was described in 1848), but they were in very low frequency: only a few hundredths of one percent. (The Brits are diligent amateur lepidopterists, and so the records are pretty good). Later genetic tests showed that the difference between carbonaria and typica was due to a single gene, with the dark color being dominant.
By 1898, the frequency of the dark form had skyrocketed, reaching 98% in the woods around Manchester. It rose as well in other parts of England, particularly the industrialized parts. In rural areas the frequency of the dark variant was lower. This concerted rise in such a short time surely indicated the operation of natural selection. Although there were several theories about how this operated, the most likely seemed to be based on camouflage: as industrialization darkened the tree trunks with soot, and killed the lichens, the typica form was no longer cryptic on the formerly light-colored trees (especially birches), and now the dark form was camouflaged instead. Here are some photos showing how the dark form is conspicuous on darkened trunks and the light form on normal, non-sooty trees: