Bosnia's rail infrastructure was badly damaged during the war and has yet to return to pre-war levels of operation. Most international visitors arriving by train will be coming from Zagreb or Budapest. There is also a train to and from Ploče on the southern coast of Croatia which is worth looking into as the journey, via Mostar, is very scenic. Sarajevo's train station is right near the bus station and you can get into the heart of town via a bus, tram or 5-6 KM taxi ride.
Railway Station Sarajevo
Put života 2, Sarajevo 71000