Trams are the most frequent form of public transport in Vienna and the tram system dates back to the 1800s. I should point out that one or two upgrades have taken place, since.
The entire city is criscrossed by tramlines, whereby most go to and from the city center (like spokes on a wheel) and fewer go across town. Each tramline is powered by overhead electric cables, and has a number or letter designation. Most lines run from the early morning until after midnight, with special night trams also in operation on selected lines.
During the bulk of the day, intervals between trams are generally 4-8 minutes, and delays are rare. Vienna is geared up for snow, so there have to be serious blizzards to keep the trams off the road.
There are no special rules of the road for using them, other than to note that seats marked with colored symbols for the old, the handicapped, pregnant women or parents with young kids should be kept free for the same. As you approach your stop, you should press the exit button on any door to warn the driver.
In reality, there's always someone waiting so the tram will likely stop anyway, but you need to press the button to get the door to open when you do stop.
The modern trams
Vienna's currently moving from the "old" style trams (see the picture of the number 10) to the new Niederflur trams (see the photo). The latter are very low lying, so you can drive a pram or wheelchair straight on without going up steps.
If you're driving, remember that the trams are the kings of the road. Don't block a tramline unless you really must - they don't take kindly to unnecessary delays and are bigger than you. They also have right of way.
Most importantly, if you're driving alongside a tram and it's nearing a stop, you must slow down and stop, too, even if the road ahead is clear. You can only pass a tram at or near a stop if there are no people around and if you go at crawling pace.