BTW - they're produced by plants, probably as some kind of defense against things like caterpillars and bacteria.
People discovered that they can take bark from a tree like an oak or elm or chestnut, cook it in water, and use that to soak animal skins. That's called "tanning" the hide. The tannins help remove and destroy the protein from scraps of meat and fat and they transform the skin. Mix the tannin water with some human urine and a few other things and you turn skin to rawhide to leather. Today you can go through those same steps in certain clubs.
The tannins are partly what accounts for the bitter and astringent nature of the skins you find in acorns and walnuts and filberts, they're found in skins of grapes and apples, and of course in the bark and stems and seeds of the plants. They're what makes your tongue stick to the roof of your mouth when you drink some red wines. Usually they're not as present in whites.
As you age your wine, they polymerize and fall to the bottom as part of the sediment, although there's some evidence that that's not really what happens either. Because they bind with oxygen, they keep your wine from being ruined by the oxygen, and thus they're preservatives. That's why people want them in red wine that they intend to age. They aren't necessarily the things that make your wine taste bitter - there are lots of other compounds that can do that and tannins are maybe more involved in the sensation than in the taste, but they do have a bitterness too.
People talk about "fine" tannins and "silky" tannins and such and frankly, I have no idea what they're talking about most of the time. Sometimes they do but I think they really are referring to the ripeness of the fruit and perhaps the winemaking.
As suggested, make black tea with a tea bag and then squish the juice out of the bag onto a spoon and taste it. If you're using a tea bag in the first place, the tea is going to taste horrible, but that last bit that you squish out is going to have more undesireable tannins than the part that simply leeched out during steeping. There are also tannins in chocolate, which is why some people don't care for some chocolates, and there are tannins in many plants and fruits that we eat regularly.