Urbino is genuinely off the rail network — the nearest railway station is at Pesaro on the Adriatic coast, 36 km away.
By bus: AdriaBus and Bucci run regular bus services from Pesaro to Urbino, taking 45–55 minutes. Buses also run from Fano, Ancona, and (less frequently) directly from Rome (4 hours, one a day with Marche Bus).
By car: from the A14 Adriatic motorway, exit at Pesaro–Urbino and follow the SS73bis westward. About 35 km. The historic centre is closed to non-residents, but there is a paid car park at the Borgo Mercatale below the city walls with an escalator up into town.
Airports: closest are Falconara (Ancona, about 90 minutes by car) and Bologna (2.5 hours). Rimini is closer (1.5 hours) but has limited flights.