Personally, I figure that if someone tries for a head lock on me, they are asking me to:
1) Slam them on their head with a back suplex (if we are both standing).
2) If they haven't flattened me out for a full Bulldog Choke, I would roll them over my shoulder by stepping in between their legs and spinning into them. After taking them down, I would be in full side control or mount, in which case their arm is ripe for the picking.
Now if you are the one doing the headlock, what you do is flatten the other person out by stepping forward and dropping onto your butt (just like you're "Bulldogging" the person - thus the name). This way, they won't be able to lift or turn you once you are posted out. Once their, do what AtomDanger said and start squeezing. This should start a full-on carotid choke. If you really want to make them regret the fact that you got them, start wrenching back on their neck while you have them flat on their stomache. That should leave them with a good reminder that you got them for the next 3 days or so.
It doesn't matter if you agree or disagree
... As long as I don't bore you and I spark a moment of thought, my goal is achieved
Queng leon queng tigre ecu tacacut, queca pa? - Pampangan Mandarigma Motto