As a general rule, all foreigners staying in Germany for more than 90 days wanting to work or study in Germany need a visa before entering Germany. For more information:
Nationals of Australia, Canada, Israel, Japan, New Zealand, South Korea and the United States may apply for the necessary permit after arrival in Germany. The same applies for nationals of Andorra, Brazil, El Salvador, Honduras, Monaco and San Marino who do not intend to take up employment.
EU citizens as well as citizens of Iceland, Liechtenstein, Norway and Switzerland citizens have the right to live and work in Germany. After arrival, they just need to register with the appropriate office of the town hall (mostly called "Einwohnermeldeamt" or "Bürgeramt") of their residence in Germany.