The legal basis upon which foreigners can remain in Germany is very complicated; a detailed examination will have to be made of their reasons for being here. This is the responsibility of the Ausländerbehörde (Foreigners' Authority). Its website provides general information about entering the country, remaining here, and the expiry of residence permits, as well as advice on what to bring with you when making an application, and what costs you will have to pay. You can also make appointments online.