The easiest way of exploring this rural part of Germany with Frankfurt as a starting point is certainly to rent a car. Particularly if you would like to go to other nearby villages as well, such as Amorbach and Michelstadt (two beautiful villages of historic charm that you shouldn’t miss if you’re in the area), it is highly recommended to rent a car, as it will allow you more freedom and leisure. Coming from Frankfurt, the best route would be to take Highway A3 (direction: Wurzburg/Aschaffenburg) and then switch to Interstate B469 (direction: Miltenberg) at the exit Aschaffenburg-Stockstadt. It’s about a 1hr drive.
However, this part of Germany is also well served by regional trains, so even though you would enjoy more freedom by renting a car, it is by no means necessary. If you decide on taking the train, you can check your connections here (in English): German Train Schedule
For the regional trains even though you can search for connections online, you can’t buy the tickets online, but you will have to do it at a ticket machine at the Frankfurt central station. No need to book anything in advance. A single ticket will cost you 15 Euros if you take the regional trains (designated by RE [Regional Express trains] or RB [Regional trains] labels). If you take the faster intercity trains (designated by IC [Inter City] and ICE [Inter City Express] labels) it will be a bit more expensive, but time-wise it won’t really make a big difference. The ride is about 1,5hrs. Mind that you need to change trains in the city of Aschaffenburg. If you travel as a group, you should buy a group ticket, as it will save you some money. However, the group tickets are always for 5 people and currently cost 44 Euros, so they only make sense if you travel with 3 people plus.