You must conclude a hosting agreement with an approved research body.
A hosting agreement shows that you are planning to conduct a research work and that the research body will host you. The agreement must state the purpose, duration, and funding of the research project and your qualifications.
You must apply to the embassy or consulate in your country of origin for a visa. The visa may only be granted if the local Foreigners Authority of the place of intended residence consents. The rules of the Residence Act governing the issue of residence permits are applicable.
You do not need a visa if you are from Australia, Canada, Israel, Japan, New Zealand, South Korea or the USA.
Once in Germany, you must apply for a residence permit. The residence permit is granted by your local Foreigners Authority.