Any non-German citizen wishing to spend more that 3 months in Germany is legally required to have a residence permit. In order to work in Germany, you are also required to have a working permit.
You can obtain your residence permit by applying for one at your local “Ausländeramt“ located in the government buildings in your area. To be eligible for a permit, you will be required to prove that you can support yourself, prove that you have a dwelling, are covered by health insurance, have a certificate of good conduct and have a valid passport. The German law will also need to know the reason for, you wanting to live in Germany is. It is possible to obtain a permit to study at a German school, to work or start a new business or to re-unite a family. When the permit has been approved and processed, you will receive a stamped vignette in your passport. Once you have your passport back, it is time to register with the local authorities, called the “Einwohnermeldeamt“. Everyone living in Germany is required to do this, not just foreigners! If you move away from your community, you will be expected to inform the authorities before you leave and register again in the town you are moving to.
It is no problem for EU citizens to be granted a working permit. For non-EU citizens, it is more difficult. You will need to prove that you have a skill that is needed here or be able to prove that you have a job with a company who needs you. Spouses moving to Germany with their partner who has a working permit may also apply for one. As with the residence permit, you need to apply for a working permit at the “Ausländeramt“ in the government buildings in your area. You will need to show your residence permit and your “Meldebescheinigung“ which shows that you have registered with the authorities. A residence permit is only valid as long as the working permit is valid and sometimes only for a certain type of job. Once it has expired, you are required to have it renewed.