Tannins are weak acids (tannic acids a result of phenols) found in wood, peat and leaves.
They are what give rivers like the Rio Negro in S America its name, as they stain the water dark brown/blackish.
They are great for certain Amazonian fish from those rivers, tetras, certain cichlids, and killifish are often healthier in tanks with tannins because they can be slightly antibacterial.
One piece of wood may only slightly stain your tanks water, and only temporarily.
But many aquarists with fish from these areas hang bags of peat in tanks, or soak leaf litter, or even buy concentrated black water extract.
I used that water in conjunction with tap water in tanks where i had spawning pairs of killifish.

These days my tank is outside and gets lots of fallen leaves at certain times of year, if I don't get to them fast enough, the water can be so tannin stained I can't see to the back.
