This sounds like an ignition coil problem.

What type of car you have anyway?