Switzerland is one of the countries where public transportation in general and the train specifically are very well developed. The Fribourg train station is located in the middle of the town.
Fribourg is itself in the middle on the main Swiss train line that links Zurich with Geneva. The travel time is around 1h30 from each town with one train every half hour that will connect you with these main cities and those in the middle like Bern or Lausanne. Internationally, Fribourg can be reach by train in 4h30 from Paris, 4h from Milan and 4h30 from Frankfurt with only one change of train.
Swiss train web site and timetable: http://www.sbb.ch/
An extensive network of local train is also available that will link Fribourg with Murten or Estavayer in the west or Bulle and Gruyere in the south. It also possible from Fribourg to reach in Montbovon the famous Golden Pass train that join Montreux and Interlaken. Places that cannot be reached by train are often served by bus.
Fribourg Transports web site http://www.tpf.ch/