After your arrival in Germany you have to take care of some formalities. Here's an overview!
All students have to enrol at university before they can commence their studies. The certificate confirming enrolment is called an “Immatrikulationsbescheinigung”. It’s an important document that you’ll need on future occasions.
As soon as you have found accommodation, you must register with the local Resident Registration Office. With this in hand, you can then apply for your residence permit.
"Everything is easier if you have all the documents you need beforehand. It's really important to coordinate dates because in Germany deadlines really are deadlines!" (Asalkhon Shukurova from Uzbekistan studies at the TU Darmstadt.)