Just take the S-Bahn or U-Bahn to Frankfurt (M) Hbf (you'll be at Frankfurt (M) Flughafen) which is 1 to 3 stops depending on which system and which line you take. It's a matter of just a Euro or two for the U-Bahn pass to go back and forth.
The airport S/U station is right on the Frankfurt subway network, so you can go anywhere you want -- you don't have to go to Hbf if you have somewhere else you want to go. It's pretty convenient to get just about anywhere you want to directly from the airport, though you do need to go to Hbf if you want certain long-distance train connections.
I've done the 10 hour layover before and we just went into the city to have lunch and wander around a bit near the river. If you have excess carry-on luggage that you don't want to wander with all day, you can store it in one of the lockers at the train terminals.