Ambarawa sits roughly midway between Semarang (40 km north, one hour by car) and Yogyakarta (90 km south, two and a half to three hours) on the main central Java road. Buses between the two cities pass through frequently; ask to be dropped at terminal Bawen or terminal Ambarawa.
Despite the famous Train Museum, the regular rail line through Ambarawa closed decades ago. The heritage trains from the museum run as tourist attractions only — they are not transport.