Tehran is the capital of Iran.
West towards Qazvin
Take the metro to Gholshahr (last station of Green Line). Take the Southern exit, turn right and walk about 15 minutes until you reach the highway to Qazvin. Jump over the small wall and walk another 15 minutes along the freeway until you reach the Police checkpoint.
Note : at this point you are well out of Tehran, in Karaj. It takes around 2 hours to reach this spot from downtown Tehran, but it costs only a metro ticket (300 tomans in May 2012, 0.20$) and the spot is great, because many trucks stop here a few minutes to show their documents to the Police, including a bunch of Turkish drivers who may give you a lift directly to the border.
Take the metro to Haram-e-Motahhar (Red Line). Walk West around Imam Khomeini tomb, and South along the Freeway. After 15 minutes, you'll see the pay-toll.
Note 1 : this part of the freeway until Qom is forbidden to trucks, which take the old road. Still, this spot is the best for long distances rides. Catch a lift at least until Qom and ask to be dropped before the paytoll at the entrance of Qom (if your driver leaves the freeway). From there it will be easy to catch a ride further South (Esfahan, Shiraz), including with trucks.
Note 2 : many drivers heading to Esfahan will leave the freeway at Qom and use the old road for the rest of the trip because it is cheaper !