Tallinn, Estonia capital, has a good and integrated public transportation system, composed of city Bus, Tram (electrical train on tracks) and Trolley (electrical bus).
A travel ticket can be used in any of those systems, costing 13 eek (beforehand from kiosks or shops) or 20 EEK (from the driver). You can also by a 10 ticket package for 90 EEK. Students with valid identification pay less (6 eek beforehand, 12 eek from driver).
If you will use the public transportation a lot, you can have better prices if you buy a daily pass, 10, 30, or 90 days pass. This can be bought in paper at the kiosks, or if you have an Estonian-ID, online from pilet.ee.
Please, buy tickets before using public transportation. Every now and then, some private security personal enter checking if you have a valid ticket. If you use your ID-card, just handle them, they check in a small machine in front of you. Support Estonian economy, and don't get Tased, bro!
You can get the timetables, stops, and travel directions in the Sõiduplan site of Tallinn City Portal. More info in the Tallinn Tourism site (also a great page, full of useful info in English).
Now, for informative fun, you can check a little of the History of Public Transportation in Tallinn at Tallinna Ühistransport. Did you know that Trams in Tallinn are celebrating 120 years of operation in 2008?