The Munich airport (both terminals) is well connected to the city center by train. The S1 and S8 S-Bahn lines stop at the airport, just follow the signs after baggage claim. They run every 10 minutes and will take you to München Hbf, the main train station. Or get off the S8 slightly earlier at Marienplatz, which will put you right in the middle of the city center.
You can explore Marienplatz and perhaps walk from there a short distance to the Viktualienmarkt or the destination of your choice.
The S8 from the airport to Marienplatz will take 38 minutes, 49 minutes if you catch the S1 instead. Based on Google Maps, a car will likely take a similar amount of time without traffic and could take considerably longer if there is traffic. Just take the train in the opposite direction to get back to the airport.
As the airport is in the outer fare zone, you'll need to buy a 4 zone ticket. A single trip costs 10,80€, but a day ticket is available for 12,40€, which will get you there and back to the airport, plus any transport you desire in the city center.