Upon arrival in Germany or when moving, all international students (EU and non-EU countries) must register at the local city office or citizens' registration office.
The registration is free of charge and must take place no later than one to two weeks after moving (or entering). Only after this registration you can apply for your residence permit or extend it. The visa is intended for entry only.
The German Academic Exchange Service - DAAD gives general information about the requirements you have to fulfill if you want to study at a German university.
You may also be interested in: