Much Information is available on this topic but it's in German language.
Let me briefly expain you all how does the Medical system here in Germany works.
The total time it takes for an MD (Doctor Medicine) is six years and the final exam is after a successful Internship.
After the exam , a working permit and medical practice license is given and the person can begin his/her Residency program.
This situation was for a German national or a person who has studied Medicine in Germany.
What should a Foreigner do?
Learn good German language preferably level b2 which might take 6 months to a year.
People can find a place so that they can do observerships and not spend all the time only learning the language. Doing an observership ( i.e no patient contact) is easy to get and moresover, no license is required.
After satisfactorily doing the language there are two but many options.
1. Do an Exam, similar to that done by the German students. But, the whole exam is in German language. This makes it a bit tougher.
2. Doing an evaluating exam in which the authirity shall find out your level and will decide where you fit.
The above mentioned options sounds silly.
There are other options as well.
Many foreign doctors (excluding EU nationals) who come to Germany are treated as Guest Doctors, that implies, that they shall after completion of their education return to their home country.
Moreover, they are not liable to work for paid jobs.
The situation is not easy.
There are many criterias that shall be fulfilled.
Usually, a residency programm takes 6-8 years to complete.