It's pretty much gone. Once the preferred means of transport, it was mostly pushed away in favor of buses at the local level. In the last 40 years there was only one new track built (Beograd-Bar) AFAIK, and that was mostly connecting existing lines in the north to the difficult terrain in Montenegro (where it took about 100 tunnels and dozens of bridges). In the same period, most of the railroads were not even maintained, and many lines were dismantled or just decommissioned. In some places, specially in Vojvodina, the tracks are in such a bad condition that the permitted speed is down to 20 km/h.
The main international lines, however, are kept in working condition, though the number of operating trains is still scarce, compared with what it used to be. There are mainly two of them - north-south (connecting to Budapest etc in the north, and branching to Montenegro, Greece and Bulgaria in the south) and west-east (Zagreb-Ljubljana and further) and Romania in the east.
This means there are practically no commuter trains, except maybe a couple in Belgrade, for lack of subway (which is being promised for 50 years now). Even there the chaos reigns at the moment, as the old railway station is put out of commission, to make room for lots of prime real estate land (known as Belgrade Waterfront, aka Beograd na vodi - on water), so all the lines are now switched to Belgrade Centar station in Prokop, which is largely unfinished (i.e. nothing much done to the building since the eighties), has no access roads, no parking garage and no car loading ramp, so the car ferrying trains to Montenegro are loaded in the little station in Topčider, which isn't larger than what would fit a village.