If your driver is not going into Tallinn, but only proceeding on the Tallinn ring road towards Narva (as many trucks do), don't get off at the first roundabout where there is a road into the city. From there, it is a long distance into the center. Instead, stay with the driver until the last roundabout east of Tallinn where the E20 branches off towards Narva. From here the distance to the center is only about 12 kilometers and it is easy to hitch into the city.
Take the bus #18 (close to the Viru Gate entrance to the Old Town, where the McDonalds is) to the final stop, about a 30 minute ride. There's a large road to the south and traffic is going fairly slow. One stop earlier you also find a petrol station. Also bus #10 and 14 stop nearby, at their end stations.
Or take the "Elektriraudtee" commuter train from Tallinn-Balti jaam to Laagri station.
It may be possible to hitch from the ferry terminals. When arriving at the port from Helsinki on Viking Line or Eckerö Line, just walk to the Logi street, some 200 m away from the passenger terminal towards the city and stick out your thumb. Many trucks can take you all the way to the Polish border. There is probably a similar place for truckscoming with Tallink's ship, as well.
East towards St. Petersburg (RU)
Take one of the buses 12 (Väike-Õismäe - Priisle (this is an express line and costs more)), 13 (Väike-Õismäe - Seli) or 54 (Mereakadeemia-Estonia, 67 (Estonia-Seli) or 68 (Estonia - Priisle; does not circulate at Sundays) or better still tram 2 (Kopli-Ülemiste) or 4 (Tondi-Ülemiste) to Pae. The tram-stop to take from the centre of the town is Hobujaama. When you get to Pae hitch from the crossroad of Peterburi tee and Pae. Although buses in the 100's and 200's (e. g. 156) go there from Balti Jaam as well, they drive out of town and are therefore much more expensive than normal buses. Also, Pae street is still pretty much in town and hitchhiking from there might be a bit more difficult.
A better option is to hike from Pirita Jõgi, which is on the border of Tallinn. To get there one has to walk for some distance, though. One can go on any bus leaving from Balti Jaam to Loksa (e.g. 152). These are also buses that leave town and therefore cost more. To get there by Tallinn's public transportation one can take one the buses 13 (Väike-Õismäe - Seli) 49 or 54 (Mereakadeemia-Estonia), 67 (Estonia-Seli), 68 (Estonia-Priisle) to Priisle (or Seli if you take bus 67) and then walk along Rahu tee until one reaches Peterburi tee and walk eastward. It's best to start hitchhiking from after the bridge over Pirita river.
To get from Pae to Pirita Jõgi one can (in addition to 13 and 54, 67, 68) also take either number 50 (Seli-Pae) or 58 (Priisle-Pae) to Priisle.
Southeast towards Tartu
Take bus #2 from Viru to Pühamägi (next stop after the airport) and you can hitch just after the bus stop. If hitchhiking is not possible due the big road construction works (as of April, 2013), continue to walk on left side of the road for one more kilometre in order to get to a place with enough space to stop.
North towards Helsinki
Mostly on summer Sundays you can attempt hitching a private boat/yacht going back to Finland. It might take 6-10hours to cross with a yacht so better try your luck with a fancy expensive motorboat first. Two marinas in Tallinn: one in main port near sadamarket; another in Pirita - more relaxed (Tomi Astikainen reports hitching a fast and expensive boat with only 55min ride).
Blackriding a ferry with a truck: convince a truck driver to let you sit on his bed and not mention about a passenger when tickets are checked. This can be done in parking lot near Logi street near terminal A and bigger truck stop behind terminal D.
Tallinn has free public transportation for its citizens. Non-citizens either buy a ticket from the driver for 1.60€ or a green card at kiosks which is called Ühiskaart. It costs 2€ once and then can be charged with money. You can also buy an e-ticket (also at kiosks). If you put money on your card one hour ticket costs 1.10€. If you buy an e-ticket, a one-day ticket costs 3€. There are not many ticket inspectors around the town. But if they catch you, you could try to pretend to have no money and get away with it. They give you a fine (first time 20€) which you should pay the day after, but well, maybe you are already on the way south.
The ferry terminals close for the night. However, outside the terminal entrances there are benches where you can unroll your sleeping bag (if the weather is relatively warm).