EU citizens need a valid passport or identy card when entering to Germany. After their arrival they have to register at the local town hall. They have to give notification before leaving Germany.
Non EU citizens need to check which kind of permit they need in order to study in Germany. They should get in touch with the German consulate in their home country. Normally, a visa for studies is required.