On the railway from Perugia to Terni. (see below) Occasional buses from Spoleto
Don't expect buses from the village to meet trains unless this is confirmed by timetable. Not all trains are met and it's a huge uphill from the station to the town. Taxis come from Foligno so a taxi from Trevi to its station is very expensive.
In spite of the above Trevi is one of the most delightful of Umbrian hilltop villages and it's worth some effort to see it. The cathedral is difficult to photograph except from a distance but its a great place for walking around and enjoying the squares and the narrow streets. Go into San Francesco church to admire (and if you can to hear) the wall pump organ that claims to be the world's oldest. It has been thoroughly restored quite recently.
It would seem strange to leave Trevi without having seen Spoleto