You may require a visa to enter Germany, or you may be able to enter Germany without one. To find out whether you need a visa, where you can apply for one, and what the costs are, please visit the website of the German Federal Foreign Office.
You can check online whether you need a visa to enter Germany or if you can enter without a visa and apply for the residence after arrival: overview of visa requirement
If you stay in Germany for more than 90 days, please do not get a Schengen visa. This type of visa can not be extended and is valid for a maximum of 90 days. For longer stays you require a national visa.
Non-EU students with a EU residence permit
Students from Non-EU countries, who are holding a residence permit of a EU member state, may under certain conditions enjoy special mobility rights within the EU on the basis of the so-called REST Directive.
These students may complete part of their studies in another EU member state without a visa for up to 360 days. If your stay could fall under the REST Directive, please contact the Welcome Center as soon as possible for further information.
Further information on how to apply can be found here.