It's not the starter. (eesh, peeps. c'mon, you only use the starter to turn the engine over.) It could be the distributor, but these won't USUALLY go out while the car is running, once power is moving through the electricals, it usually won't go out until you turn the power off.
I'm guessing fuel. it COULD be electrical, but from the sounds of it, I think it's a fuel problem. Either the pump went out, filter got clogged, or something along those lines.
Check all your fuses too. Also, i'm guessing that because you just bought this car, it's probably not a (new) problem. Check with the seller, tell them you won't make a big stink about it, you just wanna know, to help you pinpoint the problem.
Oh yeah, check the fuel lines for any leakage/swelling, etc.