The Deutsche Bahn is the German railway company that runs the majority of the German railway system. Timetable information and booking options can be found here. Tickets can be purchased online or at ticket machines. Your ticket will be particularly inexpensive if you buy it at least two weeks prior to leaving (Frühbucherpreis).
Further permanent discount is granted if you purchase a BahnCard of either 25%, 50% or 100% reduction on all tickets.
Additionally FlixTrain offers train connections from and to Frankfurt (Süd).
Foto: michael berger / pixelio.de