Vienna has a very good public transport network. As a tourist, you will use mostly the underground, since this will take you to all important landmarks. In addition to the underground, you can also use trams, buses and trains.
Public transport in Vienna works mostly on the honor system. Fares are reasonable for the excellent conditions. Spot checks are performed from time to time and you will get a fine if you don’t have a ticket. Tickets that you buy must be validated on the platform for underground or in the tram or bus. You can get your tickets from automatic machines in stations that accept cash and credit cards. Some stations also have counters. If there seems to be no place for you to buy tickets, try at the nearest tobacco shop. As a tourist, you may be interested in the Vienna Card, that provides both free transport and discounts for some landmarks.
The underground is called U-Bahn and is the most popular form of transport. It covers the whole city center and it also gets to the outskirts. The train is called S-Bahn and is a common way to get to the outskirts or to nearby towns. The tram is called Straßenbahn and is a nice way to get through the city, as you will also see its beauty. Buses are not very popular in Vienna, due to all the other excellent means of transport. You may use them though if you go outside the city center. A lot of night buses are also in service, making it easy to get home if you spend the night out.