Thanks to its central location, Mechelen is easy to reach by train from practically any Belgian or European city. It only takes 20 minutes from Brussels, Leuven and Antwerp. Mechelen has 2 stations: Mechelen Central and Mechelen-Nekkerspoel. Both stations are walking distance from the city centre. From Mechelen Central it is about a fifteen-minute walk to the Grote Markt, whilst it takes barely 10 minutes from Mechelen-Nekkerspoel. You should bear in mind that not all trains stop in Mechelen-Nekkerspoel.
There is also a station in Muizen, that is walking distance from Planckendael zoo.
You will find more information about the timetables of the trains on the website of the nmbs (Belgian Railways) or in the stations.