You can travel from Istanbul to Tehran by train, bus or airplane.
Of course, airplane is the most expensive one so you’d better get a direct flight or find special offers.
Regarding the price and duration, here is a brief comparison between train and bus.
VIP bus --- 60 $ (capacity 32) ---- 70 $ (capacity 24)----- duration 70 hours
Train ------ 85 $ --------- duration 45 hours
The prices are updated June 2011.
The bus is available 4 days a week but the train is available only on Wednesdays from Tehran to Istanbul and on Tuesdays from Istanbul to Tehran.
Train ticket must be booked in advanced. Contact Iran Travel Service if you bus or train ticket bookings.