There are only a limited number of routes for the trains. Some go from Phnom Penh to Kampot. I have never tried it because I was told it’s very slow, much slower than the buses and minivans. (I have heard similar comments when I was travelling in South America where the locals also prefer not to take the trains.)
I have seen the trains running in Cambodia. They look old and they release quite a lot of pollutant. I don’t know how much they cost but the locals don’t recommend me to take the trains at all.