Bourbon barrels are made of oak, by law. I discussed this here. The use of oak is actually a tradition from antiquity, seeing as oak casks were the choice vessel for storing wine and beer through the centuries. So, the Europeans who settled in America brought this tradition with them.
The charring of barrels is also a practice that pre-dates bourbon. Wooden barrels were commonly used as containers, holding pretty much anything that needed containment: pickles and foodstuffs to metal scraps. When it was time to re-use a barrel, it was fired on the inside to sterilize it for the next use. So, it would be common for charred oak barrels to be handy during the early days of American whiskey making, and made a great whiskey transporter.
In those early days, distillers and whiskey merchants would sell most of the liquor unaged, essentially as grain alcohol. However, some whiskey was stored and aged. Since at least some of the barrels used to store this whiskey would have been charred to eliminate the remnants of its previous use, the whiskey would have a chance to age in the charred wood. When finally sold, the resultant bourbon would have been much more palatable and enjoyable to the purchaser. Thus, the benefits of using charred barrels became well known, and new barrels were charred for the sole purpose of holding bourbon during its aging process.
But why char new barrels if all these existing ones are available? Well, charred barrels became less and less available for whiskey distillers. Distillers sold their liquor to customers and retailers in the barrel; the bottling process was yet to occur. So, as barrels went out to customers and stores, they rarely found their way back to the distillery. Accordingly, distilleries were forced to char new, unused barrels to acheive the desired bourbon. Since people preferred whiskey that came from a charred barrel, producers obliged. Business is business.
Presently, the two primary barrel producers are Bluegrass Cooperage in Louisville, KY and the Independent Stave Company located in both Missouri and Kentucky. The barrels that come from these places are charred at the plant to the distillery's specifications. The charring is measured in levels, from 1 to 4, 4 being the deepest char which subjects the barrel to about 1 minute of flame. Only seconds differentiate between the char levels. A char at level 3 is very common in the distilleries.
A worthwhile, short video of the barrel-making process is found on Independent Stave's website, here.