If you’re in an open area, pull on one rein to turn the horse in a circle. Turning forces your horse to shorten his stride and slow down, plus it makes him pay attention to something other than running in a blind, brainless panic. Spiral the circle down until your horse comes to a stop. Be careful you don’t crank your horse’s head around so suddenly that you literally pull him off his feet, especially if you’re going over slippery or rough ground. Sharp turn + wet grass = horse falling over, probably on top of you.
If you’re on a narrow trail and have no space to circle, don’t haul on the reins with constant force, since your horse will just lean into the pressure or try to avoid the bit by raising his head or opening his mouth. Instead do a series of short pull-and-releases in quick succession, the same way you’d pump the brakes of a car. Or, use a pulley rein: with your reins short, plant one hand on your horse’s neck in front of the saddle, and pull up and back with the other hand. Your reins must be very taut when you try this technique, or else you’ll just cause the horse to turn.
And if all else fails, hang on. You’re probably going to end up back at the barn anyway.