The "Peak Oil" movement has quieted down in the past few years for some reason, but there's still often talk of the world running out of oil and grinding to a Mad Max style halt. It's generally tossed around as one of the top threats of TEOTWAWKI. Unfortunately, this idea ignores a simple principle of economics: supply and demand.
We do, certainly have a finite amount of oil on the planet, though there are many (many) untapped sources of oil out there. The supply will begin to decrease, and when it does, the price of oil will rise. Depending on who you ask, this supply decrease/price increase has been underway for a while now.
We've certainly seen this with the Libyan civil war--world production has fallen by about 1 million barrels per day and oil prices have risen dramatically, though there is quite a bit of speculative buying that is further inflating prices.
As the price of oil rises, two things will happen: demand for oil will decrease and alternative technologies will become more attractive and viable.
Why would demand decrease if price increase? If gas is $5 a gallon instead of $2 a gallon, people will be a lot more thrifty with their driving. Maybe they'll move closer to work or take public transportation. Regardless, their demand for oil will decrease.
For similar reasons, higher gas prices make alternative technology more attractive. The higher the price of gas goes, the more consumers will care about things like public transportation, gas mileage and gas alternatives. Hybrids, fuel cells and electric vehicles look better and better and make more financial sense. As do things like ethanol. And even expensive-to-drill conventional oil wells, not viable at current price levels, become viable the higher oil prices climb.
At $10/gallon or $20/gallon, how many people would be driving conventional gasoline engines very far? What about at $40 or $50/gallon? $100/gallon? In that case, you'd be driving something else, walking, using public transit and so on.
It's this rising price of oil that will keep us from ever truly running out. Say, theoretically, we got to the point where there were only a few barrels of oil left in the whole world. At that point, oil would be rarer than gold, platinum, pretty much anything. Can you imagine how expensive those last few barrels would be? Would anyone use them up? Probably not!