Aschaffenburg is on the main Frankfurt–Würzburg rail line and has very frequent IC and regional services from Frankfurt Hauptbahnhof (30 minutes by ICE, 40 minutes by regional). It is one of the easiest day trips from Frankfurt and is well within range of a morning departure and afternoon return.
By road, the A3 motorway runs past the city; from Frankfurt the drive is about 40 km. The city centre is compact and the main sights — palace, Pompejanum, Stiftsbasilika — are within easy walking distance of the railway station, so a car is unnecessary once you arrive.