International students who are EU nationals do not need a visa to enter Germany.
International students from other countries generally require a visa for all stays in Germany. You can find a list of the visa regulations for different countries on the website of the Federal Foreign Office.
You need to submit your visa application, together with all necessary documents, in person at the German mission (embassy or consulate-general) responsible for your place of residence. It is recommended to check the website of the respective mission well in advance of your departure date to find out about the visa procedure and about the documents that have to be submitted.
There is normally a visa fee of 75 Euros. You can find more information on the application process, costs and time needed to process your application on the website of the Federal Foreign Office.