Public transportation in Vienna is easy, inexpensive and convenient.
You have different options:
You can buy single tickets (one trip) for EUR 1,70.
You can buy a 24-hour ticket so you don't need to buy a ticket everytime for EUR 5,70.
You can buy a day ticket (so called shopping ticket = Einkaufskarte) for EUR 4,60.
You can buy a 72-hour ticket for EUR 13,60 and you have your ticket for (most likely) the whole time you are in Vienna.
Or you buy a 'Wienkarte' (Vienna ticket) for EUR 18,50 - which is valid for 72 hours, can be passed on to other people and is your entrance ticket for some museums.
All of these tickets are valid for both Underground trains, Trams and Buses.
If you use the underground, remember you need to stamp your ticket ('the time stamp' is typically in a blue post) the first time you use it, before you go to the platform.
In case of buses and trams, you stamp your ticket immediately after you entered the vehicle.
Here is a link to the Website of the public transportation in Vienna (Wiener Linien):