If you are a European student and want to study and live in Germany, you will cherish the same rights as a German citizen and EU\EFTA citizen regarding free entry, the opportunity to study and work without any additional permits. If you are not however a European citizen and you want to study in Germany, you will have to apply for a Visa. Unless you are enrolled on a summer school language program, you will need to apply for a student visa that allows you to reside in Germany for more than 90 days and also get a residency permit to become able to live and move around the country. The residency permit will also allow you to travel visa-free in the whole Schengen Area, which makes for a wonderful opportunity to visit the countries you are interested in within the time-frame.
Once you receive the letter of acceptance from the designated German University, it is recommendable to apply for a student visa at least 3 months prior to your intended departure (the time you are expected to be in Germany). As for the residency permit, all your documentation will be sent to the Immigration Office of the German region where your University is stationed, and after every bureaucratic procedure is done you will be issued the residency permit. In order to obtain the student visa, however, there are certain criteria that need to be met. If you are traveling to Europe on such a permit, you will have to inform the designated authorities prior to your departure.