After your arrival in Germany, the local youth office is responsible for you. You will have a caretaker who will sort out your accommodation. If you have relatives in Germany, it might be possible for you to live with them. If not, you will be accommodated in a foster family, with a residential group or in an asylum home. This is called “Inobhutnahme” which roughly translates to “taking into care”. Before you end up with your actual caretaker, there is still a few steps to go through.
The Youth Office for example initiates a Clearing procedure (“Clearingverfahren”) which works differently in each estate. The first step of this procedure is often the First Screening (“Erstscreening”) which includes a medical examination and some tests for age assessment. Usually, you will be transferred to one of the 16 states within 14 days of your arrival (“Bundesweite Umverteilung”). During the clearing process, the Foreigners' Registration Office ("Ausländerbehörde") will clarify your residency status.