To drive in Germany, in principle, you need a driving licence issued in Germany or another EU country. The national driving licence granted by the authorities in your home country is only valid for six months in Germany- the period begins with your first police registration ("polizeilichen Anmeldung") in Germany. You must always carry your driving licence with you when driving. At the end of these six months, you need to transfer your driving licence ("Umschreibung") if you wish to continue driving. You can read more about the transfer process in the section "Where and how can I have my driving licence transferred?"
If you are only visiting Germany, you are allowed to drive with the driving licence you have obtained in your home country or an international driving licence. Keep in mind that you must always have your driving licence with you when driving. You can read more (in English and German) on the website of the Federal Ministry of Transport and Digital Infrastructure (BMVI).
Please note: During your asylum procedure, BAMF keeps all your documents and often return them only at the end of the procedure. You are not allowed to drive as long as your driving licence is held by the BAMF.