A 5 hour layover is a bit short for a city visit, but you can give it a try if you like. Takes about 45 min. to deplane and emerge into the public area. Is your flight landing in terminal 1 or 2?
Store your carry on at the luggage storage, 5 € for under 3 hours.
Go to the Regional train station located under terminal 1, Arrivals B-1. Get an all day ticket from the turquoise RMV machines. Ride the S-8 or S-9 to the Hauptwache, which is the 6th stop. The Römer, the Alt Stadt, the Kaiserdom, the Klein Markt Halle, and the river are all about a 5 min. walk from here. Just ask people, they will point you in the right direction, or just walk south.
The trains run every 15 min. and the ride will take about 13 min. Make sure you give yourself enough time to get back, pick up your carry-on and go back through security. 1.5 hours should be sufficient, but give yourself 2, to be sure.
You basically have about 1 hour to explore the city. If you want to taxi instead, it will cost you about 35-40 each way. If you landed at terminal 2, add in even more time.
Alternative is to go to the Squaire and have a nice meal at Paulaner, or take the bus out to the Berlin Airlift Memorial, which is next to the airport. You could also take a bus to Frankfurt Höchst, but this bus takes about 30 min. each way.