Let's hope this never happens to you, but Consumer Reports offers up this advice if your car's engine suddenly starts accelerating out of control: DO NOT PUMP THE BRAKES.
Instead: press and hold the brake down, while shifting into neutral. The engine will race, but that's not the important thing. Pull over and turn the engine off.
Here's an excellent two-minute video from the group, which shows you exactly why not to pump the brakes.