First of all, check to see that you haven't thrown the emergency stop switch. Some older elevators I've seen actually have a toggle switch with two positions, STOP and RUN, which could have accidentally been frobnicated.
Try pushing a floor button, or the door open button. Some intelligent elevator controllers will put a car to sleep when not in use, which causes the floor buttons to be disabled... however, the door open button WILL be functional. You'll probably never wind up in a disabled car unless you did something silly like prying the doors open from the outside (patience, grasshopper).
Look for a functional emergency telephone. If these fail, make noise, and LOTS OF IT. Ring the alarm bell... a lot. Ring an "SOS" on it, or just hold the button down. Shout, bang on the walls, YODEL! This will soon get someone's attention.
It is VERY unlikely that a malfunctioning elevator will fall; on traction elevators, a mechanical governor will apply the car's brakes if it tries to descend too fast, no matter what goes wrong in the controller, or even if the cables break. Hydraulic elevators are nearly incapable of falling.
Don't try to climb out into the shaft; that little hatch on the top of the elevator that you always see people climb through in the movies is locked or bolted shut from the outside of the elevator car. This is not really a bad thing, considering that the elevator you are in may be stuck... but others in the same elevator shaft may NOT. Getting crushed by two thousand pounds of steel moving at a few hundred feet per minute can ruin your whole day.
If you can see light between the elevator doors, you're at least partially lined up with a floor. This is definitely a good thing .A particular evil elevator that's failed on me several times has, both times, gotten stuck at a point almost perfectly aligned with the floor, give or take about five inches. In this case, the process of removing you from the elevator may simply involve a maintenance worker using a special elevator key in the exterior door's keyhole, and manually opening the elevator car's doors. In most other cases, the elevator can be moved by manual operation of the relays in the elevator controller.
If you are in an elevator and the building's fire alarm trips, it is quite likely that it will stop whatever it's doing and descend nonstop to the first floor, awaiting being placed in fire service. This is normal, but may take a long time in taller buildings. The doors will open when it gets there. Alternately, the elevator may simply stop at the next floor, open its doors, and go dead. NEVER attempt to leave a building via elevator in case of a fire; not only can you be trapped in an elevator that fails, but you will also probably wind up waiting for an elevator that has shut itself down and put itself out of service.
Finally, something you should not try at home: Sometimes a hydraulic elevator of a certain craptacular brand I will not mention here will have trouble levelling. This particular brand of elevator is also equipped with a REALLY crappy door operator that can be easily pried open by hand. Sometimes the levelling fails, and the doors don't open. In this case, I just push the doors open a little to see if it's close enough; if so, I just give it a good shove the rest of the way and walk off as if nothing ever happened.