Oak has been used to age wine since the Roman Empire. The oak forests in Europe were a sought after commodity. The oak was strong enough to withstand wear and tear, but malleable to be shaped into barrels, to be rolled and moved.
Inside the oak barrel, the wine made up of both water and alcohol evaporate outward thru the barrels staves and bunghole due to the porous nature of the wood. At the same time small amounts of oxygen from outside of the barrel are seeping into the barrel and into the wine, helping to soften the wine.
The effect of oak on wine is desirable. Wine makers over the centuries have determined that the wine is softened, tastes richer, and more substantial after oak ageing. However oak aging in barrels is saved for the finer wines. Chips, beans and blocks of oak are used for wines without barreling it; more mass produced wines.