The Federal Office for Migration and Refugees (BAMF) determines one of four types of protection in the asylum process: the right to asylum, refugee status, subsidiary protection, and a ban on deportation. Depending on the type of protection granted, a person receives a residence permit for a specific period.
You can find more information on this topic on the website of the Federal Government Commissioner for Migration, Refugees, and Integration.