Magdeburg is on the main rail corridor between Berlin and Hanover — trains run frequently in both directions, with the journey to Berlin taking 1.5-2 hours and Hanover around 1.5 hours. The Hauptbahnhof is centrally located, a short walk from the cathedral and old town. Regional trains connect to Halle (1 hour) and Leipzig (1.5 hours), making day trips straightforward.
By road, Magdeburg sits on the A2 motorway connecting Berlin and the Ruhr. It is about 160 km west of Berlin and 250 km east of Hanover. There is no major airport in Magdeburg; Leipzig/Halle Airport is the closest hub, about 100 km south.
By river, Magdeburg sits on the Elbe and was historically a major river port. The Magdeburg Water Bridge — an aqueduct carrying the Mittellandkanal over the Elbe — is visible from the city and is one of the world's longest navigable aqueducts, worth seeing if you're arriving or departing by road from the north.