Get your head out of his grasp as he tries to tighten the headlock. As soon as you feel your head being pulled, pull back as hard as you can. Push your opponent away with your arms in the same motion.
Walk along the ground so that your body is in tight with your opponent's if you were unable to get out of the initial headlock. He will want to stay perpendicular to you to keep pressure down. Deprive him that pressure by eliminating the space between you.
Lock your arms around your opponent's midsection. Get your arms as tight around him as possible.
Bridge off your heels toward your opponent. Staying bridged, shift to the other side. By keeping your arms locked while you do this, you will pull your opponent over the top of you. This will force him to bail out of the headlock.
Stay close behind your opponent as he bails out of the headlock to score a reversal.