I realise that there's a node called "How to Ride a Bus" that delves into the finer points of mass transit. I will not attempt to duplicate xirho et al's efforts, but I feel the actual exiting of the bus is such an involved subject that it deserves a node of its very own.
Also note that this primer refers to MTA and New Jersey Transit busses - the rules may not apply elsewhere. Most of the social constructs mentioned refer to MTA busses only.
Getting off a bus where you want to is hard - there are all sorts of factors (traffic, the driver, other passengers) that make it difficult. There are, however, certain steps you can take to make it easier, or at least to keep you from making a fool out of yourself.
Step One: Know the Route
make sure you know where you're getting off well in advance. Busses are large, cumbersome vehicles that don't exactly stop on a dime (though I've see it attempted). Be prepared to leave two stops before you need to.
Step Two: Push the Button, and Push it First
It is a matter of pride to be the person who signals the driver first; the implication is that you knew where you were going way before anyone else. It's also a symbol of ownership: "I hit the button. This is MY stop." To further this end, have your finger on the little yellow strip as the bus pulls up to the stop before yours. Watch everyone getting on and off. Hit the button as soon as the doors close (with most MTA busses the light that says "Stop Requested" won't stay lit if you hit the signal with the doors still open). Bask in the glow of the sign.
If, for some unheard of reason, someone beats you to the signal, either 1. push it anyway and act like it was you who did it, 2. pretend you weren't going for the button at all. Study your nails or something.
Step Three: Standing up
This is tricky - stand up too soon and you look like you're in a rush, stand up too late and you hold people up. It's usually best to stand right as the bus starts slowing down for your stop because 1. it's easier to lose your balance at higher speeds and 2. this gives you times to get to the door. Oh, and if there're people in front of you waiting to get off, don't shoulder past them, push them or suck your teeth at them. If you're that annoyed you should've used the other door.
Step Four: Ok, I'm here. Now. Which door?
Which door you use depends on where you're going in relation to the bus stop, where you managed to grab a seat (or not) on the bus, how many people are disembarking with you and whether you have a relationship with your busdriver. On the one hand, it's polite to thank your bus driver for not killing you or any pedestrians on your way home, on the other hand the back door is usually less crowded.
Generally, the rule is: If you're in a hurry it's usually best to stick to the closest door, regardless of other factors. If you're not in a hurry it's best to stick to the front door so you can acknowledge your driver's effort, unless he wasn't a particularly good driver. In that case, it's best to avoid him or her and exit through the rear. There are exceptions of course, but this rule will cover 90% of your exiting adventures.
Step Five: Movin' Out
Most modern busses are "kneeling", that is to say, the bus' carridge is suspended above the suspension by pistons. When the bus pulls to a stop these pistons can lower the section of the carridge by the front door down to the ground to help the elderly, semi-handicapped or infirm.
Some bus drivers use this feature at every stop. It makes a certain amount of sense, really - how does he know that a young athletic-type guy doesn't have a bum leg? However if you don't need the extra assistance it is of vital importance that you prove to everyone else on the bus that you're in perfect health. If your driver kneels the bus you must be on the ground before the lowering operation is completed. Only then will you prove your vigor. Bad weather negates this rule.
Step Six: Yay! I got off the bus. Now what?
Do a little dance? How the hell should I know? If you want to practice I suggest hopping on a bus headed in the opposite direction and repeat your adventure. Otherwise, go wherever you were headed in the first place.