At least once in the lifespan of almost every male, the problem of what do to when certain highly important, phenomenally sensitive organs become entrapped in the metallic teeth of the common trouser zipper will arise. This is indeed a thorny problem, and one that if handled inadequately can lead to a lifetime of embarrassment, pain, and/or sexual dysfunction.
Fortunately, this is not a problem without remedy. As with any of modern society's problems, often the most important remedy is prevention. If you can prevent yourself from ever becoming entangled, the messy business of extraction can be avoided entirely. With that in mind:
Zip before buttoning - There have always been two schools on the proper method of zippage; the school that tells you to button first, zip afterwards, and the school that prefers to zip before buttoning. The second school is correct. Buttoning before zipping obstructs the all-important line of sight - see the last point.
Zip with the lights on - This might seem like a no-brainer, but situations may arise where you are zipping in the dark. If at all possible, turn on the lights first. If not - proceed with caution, and you should be okay.
Zip slowly - It's not a race, and it's seldom that you'll be in such a hurry that you need the extra one to two seconds lost by a well-paced, slightly slower zip.
Watch yourself - This is, by far, the most important step - keep an eye on the goods. If you're attentive and focused, you should never have a problem in keeping everything free of the teeth of the zipper.
People are, however, only human, and there will come a time where prevention fails or is forgotten about. When that happens, you may find yourself caught. If so, here are some more tips:
Don't panic - The first, and most important step is not to freak out. This isn't the end of the world. This has happened to thousands of men before you; chances are it's even happened to you before. The only way to extract yourself is to remain rational and calm.
Cease zipping instantly upon detection of pain - Again, this may seem like a no-brainer, but in this game, every little thing is important. If you weren't zipping too speedily, you should be able to halt the progress of the zipper before too much becomes entangled. If you were... well, good luck. Ouch...
Maintain the current position of everything - Don't let the trousers drop, or any entangled organs sag. First of all, this will probably hurt. Secondly, it may do more damage (which is why it will hurt). If anything is suspended - no matter how unnaturally - keep it so, for the time being.
Sit down - Find a nearby chair, sofa, bed, toilet. Find anything that you can sit on as soon as possible, while maintaining the current precarious arrangement of trousers and organs, and sit on it softly. Don't plop down, don't throw yourself into it, and don't lie down. It's important that you find something to sit on - sitting on the floor may cause shifting, and damage.
Don't think sexual thoughts - Chances are you won't, but just make sure to keep your mind elsewhere. Depending on what and how things are entangled, an erection may only exacerbate the problem.
Proceed slowly - You're not trying to loosen a piece of fabric, you're trying to loosen something with an enormous amount of sensitivity, something that can be damaged. Contrary to popular belief, the bulk of damage done in such situations is done during extraction, usually when the extractor proceeds without enough caution. Don't buy into the 'band-aid belief' - that doing it all in one swift motion is the best thing. Remember exactly what you're dealing with here - don't take any risks. The position, type, and amount of entanglement are all factors that will influence exactly how you extract yourself. Proceed very slowly, and let comfort be your guide - the instant something feels uncomfortable, cease it. Always remember - finesse, not force. Work in increments, just try to free a little bit - a tiny bit, even - at a time. This is a slow, painstaking process, but this is one case where slow and steady will definitely win the race, while swift and uneven will end up bleeding and possibly unable to father children.
If all else fails:
Don't be afraid to ask for help - It's an embarrassing situation you're caught in, to be sure, but dignity is unimportant here. If someone may be of use to you in any way - whether in actual extraction, in the fetching of tools to aid extraction, in reading this Guide Entry to you, or even just in good old-fashioned moral support - then by all means, call on them.
The family jewels are more important than any pair of pants - If it comes right down to it, don't hesitate to break out scissors, knives, or anything else that may help separate you from the pants. However, use of sharp objects around so vulnerable an area is not recommended, and such objects are more useful if used indirectly (cutting the damned pants off) than directly (poking, prodding, prying, etc). Ruining the pants to save yourself is okay - but try and keep sharp objects away from the flesh.
Call the emergency services - If you don't think you can save yourself, professionals almost certainly can, and although you may find it embarrassing, chances are they've seen much, much worse.
If you can manage to keep your cool and follow the tips above, chances are you should be able to free yourself with a minimum of pain and damage. Most of the time, if you're slow and careful, no damage will be done at all. Just remember - prevention is the key; if you do get caught proceed slowly and cautiously, and don't panic.