Here are the four steps to dealing with an accelerator that sticks.
As hard as you can! You need to first counter the problem of your gas pedal keeping the car moving. I'm talking Fred Flinstone here, (kids ask your parents who that is), both feet until you can't push any further.
You need to remove the engines power from going to the cars wheels. Many models of cars don't require anything more than pushing the selector to the neutral position. Some, you need to press a button. Either way, hammer that selector to 'N'. At this time, you will hear your engine screaming...don't worry, better that then smashing into something/someone. You may want to ease of the brakes now so you can get off the road.
If you can't shift to neutral than jump to 3 and 4.
Get off the roadway or over to the curb by steering gently in the direction you want to go.
Shut the car off.
4.) Once you are stopped, turn off the ignition.
The faster that you can accomplish these steps, the safer you will be while minimizing the potential damage to your engine.
You can practice these while stationary so that you can be proficient at it in case you ever need to do it. (And if I had a car that was under a recall notice for this problem, you bet I'd be practicing it - if I was going to drive it at all.)
The reason that you turn off the ignition last is because you will need the power from the engine to keep your power steering and brakes activated going.
Always refer to your manufacturers recommended procedure for this problem which may vary slightly depending on your model of vehicle.