An absolute necessity for any cyclist living in a major metropolitan area who wishes to leave their bike unattended for any length of time, a U-Lock is a wonderful invention with a solid, efficient design
that serves so many utilitarian
purposes, it's almost as versatile as a Swiss Army knife
, and stands up to punishment better than a rusty old chain.
Named, obviously, for it's U-shaped appearance, the primary function of the lock is to secure a bike frame around some stationary object, like a parking meter, or a stop sign post, or a fence, or a rack of some sort, or another bike frame already shackled to some poor object that has a dozen other cycles attached to it (a common scenario found outside college buildings). The U-shaped portion is a solid curve of about a half-inch of reinforced steel, which is purchasable in varying lengths from four inches to nearly a foot. A locking bar with a circular key lock crosses the tips of the U to complete the circuit of metal. The whole thing is laminated with a waterproof synthetic coating, which also aids in keeping a grip on the thing when using it for a more offensive purpose.
Commonly, the best way to lock a bike down is to loop the U-lock through the end of the front tire and upwards through the lower bar of the forward portion of the frame (also known as the 'down tube'), while simultaneously embracing with it whatever immovable, un-fuck-withable object you're securing it to. This prevents someone from making off with your front tire, and the rear tire is regarded as fairly safe unsecured, as it tends to be a hassle to remove in general, given the complex tangle that the derailleur system makes around the rear hub, compounded with the difficulty involved in lifting the rear section of a properly-secured bike off the ground to allow the thefted tire to be rolled out. Some riders take the rear tire off themselves, and integrate it with everything else secured up front.
Now, while the u-lock will do well in deterring a theft, it cannot absolutely stop people from fucking around with your ride. Firstly, all the hype on the box about it being "bolt cutter and leverage-attack resistant" is true enough to stop the amateur criminal, but any professional in the industry will gladly inform you that if the consummate bicycle thief wants your cycle badly enough, he'll get it. That's why it's good to make your bike look as unattractive as possible by never washing non-mechanical areas, covering it with stickers and tape, and locking it next to prettier, cleaner, more expensive-looking bikes. Picture, for example, the mildly attractive person who takes a less attractive 'friend' of the same sex out clubbing for the purpose of, through comparison, enhancing their own beauty. Let your bike be that ugly friend; you do not want it to be slipped GHB and date raped at the end of the night. A braided-steel cable also helps, as it can be looped through various detachable components such as quick-release seats, suspension systems, lights, that rear tire and soforth. As for physical vandalism; there's really no way to keep your bike entirely safe from tire slashing, spoke smashing, cable cutting, brake tampering or any other imaginable form of abuse; your best bet is to just keep your frame rather low-key, and put anything controversial (stickers indicating stances on abortion, politics, etc.) which may piss someone off on some other object.
As for the secondary use of a U-lock, one only needs to pick up the thing and heft it around for awhile to realize that it can do a hell of a lot of damage if swung properly (hand clasped around the dip of the U, the upper lock-bar used as the impact surface). A good smack from a U-lock can knock the teeth out of human assailants and the windows out of vehicular ones; it isn't unheard of for bike messengers to use their locks to put dents in the hoods of aggressive taxis and SUV's after near-collisions, regardless of fault. Best kept dangling off the handlebars for easy access, a rider can often find that merely raising it in the air or waving it about menacingly will clearly establish and fortify your legal right (in America and the UK, as I'm aware, and most positively elsewhere in this world) to the full usage of a traffic lane in the minds of any obstinate, honking drivers.