Public transport with your student ID
How to use the public transport without paying fees - because you have already paid them.
The AStA (Allgemeiner Studierendenausschuss - general committee of students) has arranged that you can use your student ID as a public transport ticket within quite a huge area around Darmstadt (i.e. almost all of Hessen) -- without additional fees, as you already paid for these by enrolling at TU Darmstadt. That means you do not have to pay in order to take a regional train to Frankfurt, but you still have to pay extra for transportation using long-distance trains like ICE (inter-city express) or IC (inter-city)/EC (euro-city) trains. The map on the this webpage shows you in which area you can use your student ID as a public transport ticket. You need to have your regular ID as well as you student ID with you in order for your student ID to be recognised as a public transport ticket.
Travel in Germany by bus and train
However, you may want to travel through through more of Germany than Hessen only. In that case you can buy train tickets via Deutsche Bahn (the German train services). You can basically obtain two types of tickets: The standard ticket allows you to travel within the day of booking on the route you have selected. In this case, iIf you order an ICE Ticket from Frankfurt to Stuttgart and your train stops in Heidelberg, you can exit the train in Heidelberg, do a bit of sightseeing and resume your travel to Stuttgart on the same day. In addition to the regular price tickets, the Deutsche Bahn offers tickets at special discounts, called Sparpreise. If you obtain one of the latter, you are usually train-bound, which means you have to take the exact sequence of trains listed in your ticket and will get into trouble if you intend to take a different train. If you don't feel overly confident about booking a trip online or via ticket machine, you can also still visit a travel centre in any larger train station (e.g. Darmstadt's central station) and find helpful staff to guide you through the process.
In recent years, a long-distance bus services called Flixbus has established themself in Germany. These are usually cheaper than taking a train, but often take a little longer than the former. There are a few long-distance bus routes passing through Darmstadt and several more stopping in Frankfurt, which connect to nearly every larger city in Germany as well as some destinations in neighbouring countries.