Well into the 1900's beer was still being transported, stored, and served from wooden barrels. Brewers tried to avoid any flavors the wood may lend to the beer by soaking the barrels in boiling water or hydrochloric acid, then they would line the barrels with pitch, which is basically tree sap, to prevent leakage. Today, we turn to barrels for a different reason: flavor. The two most common wooden vessels being used today are bourbon and wine barrels, but any barrel that once held a flavorful liquid (or even new oak barrels)
Brewers must carefully select which barrel will match best with the beer they tuck away inside. Bourbon whisk(e)y barrels provide boozy notes from its previous occupant with notes of vanillin, toast, smoke, and spice from the charring process of the wood. Wine barrels work much the same way, providing another layer of vinous flavor to the finished beer. Certain barrels can also have loads of microflora living in the wood itself, providing funk (brettanomyces) and sour (lactobacillus).
Which barrels are paired up with a style is really up to the brewer, but often darker beers find their mate in bourbon/whisk(e)y or red wine barrels, while lighter styles lounge away in oaky chardonnay barrels. Keep an eye out for gin, rum, tequila, and vermouth barrel-aged treats too. Barrel aged goodies are the perfect fall and winter warmer. Sorry, pumpkin beers. But, not really.