Depending on whether you take the S1 or the S8 from downtown and from what downtown station you leave, the trip to the airport takes about 40 minutes. I would say that in the Hbf (tief) station there is only one platform for both directions. (Tief is German for "deep", the underground S-Bahn station.) The S8 goes through that station going towards München Ost station; the S1 goes through that station going the other direction, towards Pasing. Whichever one comes by first will get you to the airport sooner.
Note: make sure you take the S-Bahn that says it is going to the Flughafen or Freising. The S-Bahn coming from the airport also go through the Hbf (tief), but they are going to München Ost (S1) or Herrsching/Weßling (S8). Also, if you get on the S1, get on the back of the train. The train splits at Neufahrn and the front half goes to Freising.
From Marienplatz the situation is different. S1 and S8 are on different levels, so you can't just stand on a single platform and take the next train to the airport regardless of direction. both S-Bahn leave on a 20 minute cycle, but 95% of the time the next one leaving would be the S8 from track (Gleis) 1, the higher of the two "stations". And the S8 takes 10 minutes less to the airport from Marienplatz. I would just go down to Gleis 1 and wait there.
You will undoubtedly fly into Terminal 2 at MUC. Most intra-Europe flights, except Lufthansa, leave from Terminal 1. No problem; you just might not want to retrace you steps and go back to the terminal where you flew in.