Chemical filtration is the removal of pollutants by the use of specially designed filter media that absorbs, or adsorbs substances that may be harmful to aquatic life.
The most common chemical filtration media is activated carbon, which comes with many aquarium filters. Although biological filtration removes the waste substances produced by fishes, there are many substances which build up in the aquarium either from biological activity (e.g. phosphates from fish food) or from the replenishment of water (e.g. toxic heavy metals from tapwater).
Some of these substances, if allowed to build up, can cause problems such as algae blooms, or in the case of heavy metals, a build-up in the fish's body, which eventually results in damage to the nervous system and death. Using chemical filtration takes these pollutants out of the water, preventing these problems from occurring.
Most chemical medias need regular replacement or recharging to prevent them becoming saturated with pollutants, at which point they can stop removing pollutants and actually release them back into the water. Under some circumstances, chemical medias can become detrimental and should not be used; this is because they will also remove useful chemicals such as treatments, plant fertilizers, and nutrients.
In planted aquariums, the plants actually act as a chemical filter by removing toxins themselves so additional chemical filtration is not required on a permanent basis and is best avoided, leaving nutrients in the water for the plants to utilize.
Whichever style of aquarium you have, it is always best to use chemical filtration at least on an occasional basis, to give the water an occasional 'polish'.
Chemical filtration can also be used to prepare water for use in the aquarium; this is particularly the case when using rainwater, which tends to pick up large volumes of toxins on its journey through the atmosphere.