It is quite true that there is a finite amount of oil in the ground. We have to run out of it sometime, and before that happens production has to peak and decline.
The oil industry normally estimates that this will happen around 2030. Daniel Yegin puts that date closer to 2020. A number of analysts, including prominent ones in Bush’s White House, and leading environmentalists think it may have already happened, or at least is likely to occur by 2010. There is at least some evidence that this view may be right.
The same efficiency measures and renewable alternatives that will solve global warming will phase out oil faster than the worse case peak oil projections require. U.S. domestic oil production peaked in the mid 70s. ~30 years later we still produce 40% of that peak. To solve global warming we need to phase out all fossil fuels almost completely – a 98% or better reduction over a thirty year period. We can’t solve global warming without decreasing fossil fuel use faster than oil production drops - just as a side effect.