Extension of a visa

For studies longer than 3 months, a German national visa is required.
If you are entering Germany on a national visa, you will need to extend your stay by obtaining a residence permit to study in Germany at the Foreigners’ Registration Office. You must do this while your entry visa is still valid.
  Required documents for obtaining a residence permit must have:
The passport
biometric photographs.
Confirmation of registration.
Lease contract.
Certificate of enrollment from the university,
Registration at the registration office,
Funding confirmation
Valid health insurance policy. 
 
Like a visa, a residence permit is issued for a specific purpose. For international students, a Visa Extension may be issued for the purpose of enrolling in a university, language course or study. The purpose of your stay in the country determines, as well as the extent to which you are allowed to work! 
A residence permit for the purpose of study is issued immediately for 1-2 years and must always be renewed before the expiration of this period.