The S2 trains from Munich run to the center of town. Once you get off at the Dachau stop you take a shuttle bus 724 or 726 that stop near the entrance of the memorial site ("KZ-Gedenkstätte"). Remember you can have up to 5 people on one train ticket so if you are with a group make sure you purchase the group rate, i.e. the Bayern Ticketfor 5 people for all transport within Bavaria for one day.
Regional trains run from Munich central station (Hauptbahnhof) three times per hour and take 25 mins to reach Dachau.