A diverse and complex group of chemical compounds that occur in the bark of many trees and in fruits. Strictly speaking, a tannin is a compound that is capable of interacting with proteins and precipitating them, this is the basis of the process of tanning animal hides (hence the name tannin) and is also a process that is believed to be responsible for the sensation of astringency."—Jancis Robinson, The Oxford Companion to Wine
Fundamentals, people. We're focusing on fundamentals. You can slam-dunk later on.
I'm sure you know this word already. Tannin was likely the first piece of wine vocab you learned. It was definitely the first term I absorbed. The word served as explanation for why I didn't like that French red at that house party, the one nursed from the bottle, age twenty. My face had contorted, and someone pointed out Oh, that's tannin, bro. Allow me to expand on that first lesson...
You are probably already skilled at identifying the sensation of tannin, that drying astringency mostly associated with red wines. However, red wine is not the only place you encounter the stuff. Black tea has tannin in spades (especially when oversteeped), as does the skin of a peanut. The skins of common apple varieties are always a bit tannic, but the tannin of crabapples and traditional cider apples is usually so intense (especially with their soaring levels of acidity) that it makes them pretty much inedible.
Tannin exists in the skin, seeds, and stems of grapes. Red wines get color and tannin by soaking these components in the fermenting juice. White juice usually ferments on its own, away from all that material, so they don't show much tannin (although there is usually still a touch). There's also tannin in the oak barrels that wine is sometimes aged in—how much depends on how the barrels were made and whether they've been used in winemaking before. Tannin is one of the main things that allows a red wine to age, with acidity being the other. These two become the framework upon which the fancier thing, fruit, is draped.
Why is one wine more tannic than another? Ugh, that's a huge question, even for science, but grape variety will be the most important factor (compare the very tannic Nebbiolo of Italy's Piedmont against their softer Barbera, if you feel like it). Growing site, winemaking technique, and ripeness also seem to affect how much tannin makes it into the wine, while our old pal acidity seems to enhance our perception of it.