The most common and convenient way of getting around Serbia is by bus. See Bus travel in the former Yugoslavia for more information. For timetables (though not the prices) you can check polazak.rs
Trains in Serbia are considerably slower than most of Western/Central Europe, but they can be a quite scenic way of seeing the country. On most of the routes trains are also slower than buses, exceptions being the lines running from Belgrade to Novi Sad, and to the Croatian border (Šid). They can be a lot cheaper (up to 40%), however. Trains are considerably more often on time, but the intensity of rail services has been decreased on most lines (with some international lines being suspended).
Most railways journeys are operated by new trains (Stadler Flirt for electrified lines and Metrovagonmash RA-2 for non-electrified ones, but you can still find some of the older trains in use on peripheral lines (JŽ class 412/416 made in the Soviet Union), and even some of the old East German diesel rail-buses (Šinobus), latter, mostly in regional use in Banat) and more regular locomotive-hauled trains serving international lines.
All trains are operated by Serbian Railways’ passenger branch SrbijaVoz. (timetables available, though, for some reason, prices are available just for certain routes. For train prices for all routes you can check polazak.rs . You would need to choose a railway station in the places you are traveling to (marked with a train symbol, and followed by ŽS.
There are several train types in regular passenger service, but the type of the train rarely influences the actual journey time, or train speed. They also differ slightly in prices.
Brzi (Fast) trains (marked with a B on timetables), which theoretically stop on fewer stops (though this mostly means, the most peripheral ones).
RegioEkspres trains (marked with a Re on timetables), which stop on most stations (this usually means all).
These two types of trains have a supplement that is added to the ticket (50 RSD for journeys up to 50 km, and 100 RSD for journeys over 50 km, for Re trains, and 100 RSD for B trains).
Putnički (Passenger) (marked with a PT on timetables) trains, which stop at all stations and don’t have a supplement. This type is becoming increasingly uncommon as ŽS is phasing it out in favour of Re trains.
Train travel times and prices:
Train travel in most of Serbia is in no way time-saving, though it can be a very good option for budget travelers. There are (in theory) two classes in B and Re trains (1st and 2nd, 1st being 20% more expensive)), though this is increasingly meaningless as new Stadler and Metrovagonmash trains have very few 1st class seats (4 in every train), and they are almost always taken by the conductors, and getting them to move can be challenging. There is almost never a 1st class carriage on most international trains either.
Travel times on most lines are much longer than traveling by bus, and many cities in Central Serbia aren’t connected to Belgrade directly (and timetable planners don’t make it a priority to allow for fast and easy changes). This situation leaves a prospective train traveler with few possibilities of enjoying rail travel to smaller cities.
Generally, it is easier, cheaper and more comfortable (and sometimes faster) to take a train from Belgrade to Novi Sad (~1½ hr journey, ~400 RSD one way). Traveling from Belgrade to Niš is another option, though this journey is much longer than by bus (~5½ hr opposed to ~3 hr), and can get very uncomfortable if you’re traveling in newer Stadler trains, as their seats were built for shorter travel times (it can also be very frustrating to sit in a completely modern train with an LCD screen constantly showing you travel speeds of 45 km/hr). This journey can, on the other hand, be a very nice, and scenic experience, if you, for example, take a PT train from Zemun (departing Belgrade Centre station at 15:22 and arriving at 20:52, costing 784 RSD) which is still operated by old compartment carriages and locomotive hauled (and almost always completely empty (May 2017).
The long-lasting change (starting in the 1980s) of Railway Terminals from Glavna Železnička Stanica Beograd (Belgrade Main Railway Station) to Beograd Centar/Prokop (Belgrade Centre/Prokop) has been (as of the 2017/18 timetable) completed. Now, the only trains terminating at the Main Railway station are the international ones, and a couple of B trains from Subotica and Novi Sad. The problem with this is that Beograd Centar is mostly unbuilt, having only the platforms and no station building, and being infamously hard to reach (as Belgrade locals like to say, it has only 1½ bus lines going to it (one going from nowhere to nowhere and another (very irregularly) going from nowhere to Slavija square). If you happen to go from Novi Sad, Subotica or Šid, you should consider exiting the train at Novi Beograd and taking a bus or a tram to the city centre. Or you could take the city railway (BG:Voz from Beograd Centar either to Novi Beograd or Karađorđev Park/Vukov spomenik, which are more centrally located. Avoid trains arriving late at night because neither Novi Beograd Station nor Belgrade Centre are a good place to be at night, and there is virtually no public transport there after 23:00. Beograd Centar was built as a railway hub for the Yugoslav Railways, and was planned for many more and much bigger trains that it sees now, so be sure you’re waiting at the right platform and stay close to the middle, because otherwise you might miss your train.
You must buy tickets at the train station before boarding the train (unless the ticket window is closed (usually only very late at night, and never in main cities). A ticket is valid for a specific train, not (as is common in Western Europe, a line), so you can’t hop-on hop-off.
The cashiers usually speak little English, so you should have a peace of paper with your destination written on it, and if you don’t want to the next train, the number of that train. The cashier will sometimes ask you if you want a reservation, and if you speak no Serbo-Croatian, they will usually put it without asking. This reservation costs 110 RSD, and has no real purpose, as it only guarantees you a seat, and trains are almost never full (except the Belgrade-Novi Sad line). Also, even if you have it, conductors can be unwilling to fight other passengers to give you the seat, and you can bet that no one on the train will have a reservation for a particular seat you take. If you don’t wish to take the reservation you should just say bez rezervacije (bez rezervatsiye) when buying a ticket.