In most cities, but especially in Rome, I would suggest getting a day pass that gives you unlimited trips on the buses and subway lines. Generally they cost as much as 4 tickets, so if you plan to take more than 4 trips, it's worth it.
You punch it at the beginning of the trip and it gets stamped with the day and time. Then you keep it with you at all times. You do
Buses and subway don't sell tickets on board, you can only buy them before hand at tobacconist stores or at train stations, or some subway where they have working machines. Here is info on the metro lines: http://www.rome.info/metro/
In most cities the public transportation is needed only if you stay in hotels away from the center of town or if you need to travel to another area on the center of town. Like in Rome, if you stay by the main train station and need to get to the Vatican or the Colosseum, you would take the subway there and back, but once there, most of the sightseeing is done on foot. So, if you plan to take more than 4 trips a day, get the day ticket, in Rome it includes unlimited rides on buses and subway and local trains. But if you plan to take only 2 trips, then buy the individual tickets.
Trains between cities are supposed to be convenient and cheap and all that. But I found them always confusing, unreliable and uncomfortable. I spent hours hunting for a ticket in Termini, where the persons behind the ticket counters would bounce us from line to line, to finally end at the correct line but with the clerk being out to lunch...
I got on trains in stations out of town, going to Rome, where the machines selling tickets were broken, the ticket booth has been closed for years and there was no other way to buy a ticket, so the only option is to get on the train and hope you don't run into a conductor because they will sell you a ticket and give you a fine for not having one.
So, I am not too happy about trains. But I guess it's part of the adventure.
Be careful in any public transportation, people steal and pick pockets, especially from unsuspecting and confused tourist!