To be convicted of a DUI, there needs to be proof that you were driving—right? Not necessarily. It depends on how the state defines a DUI. In a few states, the prosecution must prove you were actually driving before you can be convicted of a DUI. However, in most states, "operating" or "being in actual physical control" of a vehicle is enough for a DUI conviction.
In the few states where driving is a required element of a DUI charge, you might be able to mount a successful defense if the officer didn't actually catch you driving. In these states, the prosecution must prove beyond a reasonable doubt that you were driving. So, when the officer didn't observe you behind the wheel with the car in motion, it can be difficult for the prosecution to come up with the necessary proof. And if you have a way to affirmatively show you weren't driving while under the influence, even better.
But in most states, proof that you weren't driving won't get you completely off the hook. A jury might decide that you were in actual physical control of your vehicle even if you weren't actually driving down the street. In the making the determination, the jury will typically be looking at how close you were to being able to start up your vehicle and drive away. So a motorist who's defending against a charge might point to facts showing it would have taken significant time or effort to put the car in motion—circumstances like not having the keys or being asleep in the back seat.