Tannins and lignins are organic compounds found in plants and trees, particularly in bark, leaves, and seeds. By volume, 25-30% of pine needles are composed of tannins and lignins, for instance. When these plants decompose in the environment, the hardy tannic and lignic enzymes are among the last to break down (due to bacterial resistance), and they give many water bodies and streams a naturally rusty color.
Tannins were used extensively in leather tanning and dyeing, and contribute to the pollution still found in some older manufacturing sites. On the plus side, tannins released from wood provide many of our favorite flavors in wine, smoked meats, and cheese. The puckery taste of fruits like cranberries and persimmon come from tannins. Unripe fruits are strongly tannic.
Lignins are even more resistant to breakdown than tannins. In the paper and pulp industry, lignins make up about 20% of the pulpy mash that becomes paper. Lignins cause paper to yellow, so fine paper has the lignins removed. The re-release of too many tannins and lignins into the downstream environment is something pulp and paper mills must guard against.
Tannins and lignins in the water treatment industry can pose a problem by reacting with chlorine to produce new compounds called disinfection byproducts (in this case, trichloromethanes) that are suspected carcinogens. Water treatment plants have to find workarounds to this undesired situation, such as removing tannins and lignins before treatment, or using something other than chlorine to disinfect the water.
Analysis of Trace Organics in the Aquatic Environment By B. K. Afghan, Alfred S.Y. Chau
NICE ETHNOBOTANICAL HISTORY: USDA Forest Service, "Tannins"
Wikpedia, "Tannic Acid"