Pesaro's main bus station is next to the train station on Piazzale Giovanni Falcone e Paolo Borsellino, about 1.5km southwest of the beach. Adriabus operates a daily 5.40am departure to Rome (€35, 4¾ hours), with an additional departure at 3pm on weekdays; and half-hourly buses to Urbino, alternating between the normal (€3.40, 1¼ hours) and express services (€3.70, 45 minutes) from 6am to 8pm.
Pesaro's train station is on the Bologna–Lecce train line and you can reach Rome (€20.70 to €47.50, 3½ to 5¾ hours, 10 daily) directly twice daily; others require a change in Falconara Marittima or Ancona. There are at least hourly services to Ancona (€4.75 to €13, 35 to 50 minutes), Rimini (€3.85 to €15, 16 to 32 minutes) and Bologna (€11.10 to €22.50, 1¼ to 2¼ hours). The train station is on the western edge of town, about 1.5km from the beach.