The actual enrolment or matriculation at university occurs after your arrival at your place of study. You must arrive in Germany in good time for the beginning of term; you can no longer enrol after the enrolment deadline has passed.
Find out exactly when the enrolment deadlines are! They vary from university to university. Make sure you ask what documents you need for enrolment.
At the very least you will need:
After enrolment you will receive confirmation of matriculation and a student ID card. This often gets you reduced prices - for the cinema, sport, newspaper subscriptions and such like.