There are three things that could be wrong, one is that the spark plugs are not creating spark or the spark plug wires need to be replaced, second is that the valves are burnt and do not have enough compression, third is it could be the distributor needs replaced, you should make sure that the spark plug wires are tight and that none of your spark plugs are loose. I would add, from personal experience, that it might be the throttle position sensor going bad or totally gone bad. Took my car to the dealer today, they ordered me a sensor, but reset the computer and my car would not drive more than a few feet without dying. Could get it to second gear, but no power at all. Had to leave it there to wait for the sensor. Sigh.