thank you for sharing your question with the Wefugee Community!
A medical certificate (qualifizierte ärztliche Bescheinigung) you receive from your doctor or a hospital. It´s a certificate that states that you are in a medical condition that makes it impossible for you to travel or to go back to your home country (depends on the specific case).
But be aware that there are some very important requirements for such certificates. It´s important that your doctor is a specialist for your disease/disability. If you already have a doctor in Germany who is treating you for your issues it would be best to let him/her issue the certificate since he/she knows you and your case best! If you don´t have a doctor in Germany yet, you should make sure that your doctor knows about this kind of certificate and therefore knows what he/she is doing since it can be crucial for your deportation ban. Sometimes doctors don´t want to give these kind of certificates because it means some work for them. In this case it can be helpful to stay persistent but friendly or look for another doctor.
A medical certificate should contain factual information about your case, the method of the doctor, the diagnosis and severity of your disease/disability as well as the consequences it has on your living situation f. e. what special assistance do you require, what happens if you don´t receive your medicine. It´s supposed to be complete and detailed.
Unfortunately I only found information online to link you in German and not in English. I will still link it for you:
Since I am not an expert on this topic i can´t guarantee that I have listed everything that is important. If in doubt it also might be a good idea for you to get in touch with a lawyer or if you can´t pay one a counselling centre for free. You can find one close to you via this link: www.adressen.asyl.net
I hope my answer helps you! Please don´t hesitate to get back to us if you have more questions.
Note: Please keep in mind that we can´t provide qualified legal advice via the internet and that any information given can´t replace such legal advice.