To drive in Germany, in principle, you need a driving licence issued in Germany or another EU country. Driving licenses from non-EU countries are only valid for six months in Germany. This means that you are only allowed to drive in Germany with a driver's license from your home country for the first six months. The period begins with your first police registration ("polizeilichen Anmeldung") in Germany. You must always carry your driving licence with you when driving.
You must also have a translation of your driver's license into German with you. The translation must have been done by a German or internationally recognized automobile club or an authority in your home country or by a sworn translator. You can find sworn translators at bdue.de. No translation is required for driving licenses issued from the following countries: Iceland, Liechtenstein, Norway, Andorra, Hong Kong, Monaco, New Zealand, San Marino, Switzerland and Senegal. You don't need a translation for international driving licenses either.
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.