Foreigners you plan to stay for a longer time period in Germany need a so-called: Aufenthaltsgenehmigung, or residence permit.
There are 4 different kinds of residence permits:
All these permits are regulated in the <Ausländergesetz(AuslG>. The differences are as follows:
The Aufenthaltserlaubnis is the permit without any restriction, but typically limited in time. The new name according to the new <Aufenthaltsgesetz> is: Niederlassungsbewilligung
The Aufenthaltsberechtigung is the permit without restrictions and permanent, i.e. no time limit.
The Aufenthaltsbewilligung is a permit for a special purpose and for a limited time. Typically the time is based on the purpose of the stay in Germany. The maximum is 2 years, but can be extended.
The Aufenthaltsbefugnis is the permit for persons staying in Germany because of danger in their native country, when the stay is required for the benefit of the Federal Republic of Germany, when no residence permit is allowed (i.e. the person has to leave Germany), but still needs some time to solve local problems.
Expiration of the residence permit: When a foreigner with a valid and permanent residence permit leaves Germany and does not return within 6 month, his residence permit is void. (AuslG §44). The time of the aforementioned 6 month can be increased in cooperation with the respective Alien Office.
Furthermore the following exceptions apply:
1. The foreigner lived already more than 15 years in Germany before he left Germany, he receives a pensions or has sufficient income covering all his living hood expenses and he has a valid health insurance. This exception has to be certified by the respective Alien Office before leaving Germany.
2. The residence permit will not become void for a foreigner being married with or living together with a German citizen. As a proof that the residence permit is not void the respective alien office will issue a corresponding certificate. (§51,Chapter 2 of the new <Aufenthaltsgesetz>)