It's always traumatic when you go to ride your bicycle and it's not there! You can reduce the likelihood of this ever happening to you by properly locking your bike.
As you travel about the City, look at the bike racks and take note of what you see: the lonely wheel locked up, the bike with one wheel, or even the occasional naked frame. How did they get to be this way? See the images below to see what can happen if you lock your bike poorly.
As you can see, it's important to lock your bicycle frame and both wheels to something immobile using a strong lock that can not be easily cut off (and don't make the chain or a cable a weak link in the security of your bike either!). You could use a u-lock to lock through both wheels and frame as in the photo above, or lock the back wheel and frame to the bike rack and use a separate lock to lock the front wheel to the frame, or...well, the possibilities are endless! For example, the photo below is a picture of a bike what someone had locked using three small u-locks: One each for the front wheel and back wheel locked to the frame, one to lock the frame to the bike rack!
(This bike is locked with 3 U-locks)
If you don't want to be too obsessive with your locks, you can buy locking hubs for your wheels. With these, you get a special key that can be the only thing able to remove the wheels from your bike. The poor person's version is the pipe clamp. While someone can still steal your wheels with these, it will definitely slow them down.
If you use cables with your U-lock, it is important use the U-lock to lock the frame to the bike rack. Cables are not secure as this actual photo taken in the financial district shows.
And if you have a wheel stolen off of your bike, do not leave it. The parts off of your bike will be stripped off and all that you will have then is a skeleton!
(Bike stripped to the bones)