Sarajevo Airport is positively tiny for a airport in a European capital. It has an interesting recent history as a focal point in the siege of Sarajevo, but unfortunately has a less interesting present with only a couple of restaurants and flights to less than 20 destinations. All the destinations are in Europe, and most are in the Balkans. There are no economy flights into Sarajevo Airport.
Arriving by train.
A daily train runs from Zagreb to Banja Luka, Dobov, Sarajevo and Mostar before going to Ploce on the Croatian coast. There is also a night train from Budapest to Sarajevo, and one from Banja Luka in the north to Belgrade. From Sarajevo you can catch the Budapest train and make a connection to Belgrade when it briefly connects to the Banja Luka to Belgrade service at Doboj. In general all of these routes are served by buses as well as trains, and the buses are usually faster and cheaper, so the trains are really just for travellers with train passes, or people who want a more comfortable if slow journey.
Arriving by ferry.
Bosnia is virtually land-locked, with only a tiny corridor to the sea between Ploce and Dubrovnik. If you want to get a ferry here, the easiest thing to do is to get it to one of these two locations and catch a connecting bus or train.