Freiburg has a big train station not far from the city center which allows you to get easily to all big cities.
For moving inside the city, there are trams and buses - if you don't want to buy the Semesterticket, you can still use public transport from 7.30 p.m. until 3 a.m for free with your student ID. Trams and buses run the whole night on weekends and before public holidays.
In case you want to discover Freiburg's surroundings, just hop on one of Germany's most beautiful trains: Höllentalbahn. No, you're not going to end up in hell, but you will pass "Himmelreich" (Kingdom of Heaven) on your way to Titisee, Schluchsee and other beautiful places. Especially in winter, you can be in the snowy nature just within some minutes. :)
The easiest way to check the best connection is the VAG App, or either the Deutsche Bahn App. This one includes all German public transport systems.
For an easy way to university or to parties, it's normal to use the bike in Freiburg. There are not many hills and almost all streets have bike lanes. But beware, it's forbidden to drink alcohol and ride the bike! If you're new and want to buy (or sell) a cheap bike, we can recommend Bicycle Fairs such as the ones at the Freiburger Messe. It takes place several times per semester and is a good way to get a nice bike for a good price.
Another way to get a bike is renting it, for example at the main train station. They have a big service for all kind of bikes. You can find more information here: Radstation Freiburg.