One hour by train from Berne to Avenches via Kerzers; 1½ hours by train from Lausanne to Avenches. The youth hostel is about 15 minutes' walk from the station. Alternatively you may also take bus no. 544 and get off at station "Faubourg". Or by local bus Aventibus in 10 minutes until Avenches Joli-Val stop.
In Fribourg turn off the main road in the direction of Donatyre (signpost). The youth hostel has a limited number of chargeable car parking spaces.