According to the Federal Government’s model ordinance, only people entering the Federal Republic of Germany from a risk area are required to stay in quarantine for 14 days.
A risk area is an area where various quantitative and qualitative criteria (most importantly, more than 50 new infections per 100,000 residents and government-ordered protective measures) indicate that a higher risk of infection with the coronavirus SARS-CoV-2 exists at the time the traveller enters the Federal Republic of Germany. The names of countries considered risk areas are published on the website of the Robert Koch Institute.
According to the model ordinance, the quarantine requirement does not apply to travellers in transit through Germany who show no symptoms of infection with COVID-19, or to people who have a doctor’s certificate stating that they show no signs of infection with the coronavirus SARS-CoV-2. Such a certificate must come from a doctor in an EU member state or in a country listed on the website of the Robert Koch Institute at https://www.rki.de/covid-19-tests, and it must have been issued within the past 48 hours.
The federal states issue rules on quarantine under their own authority. For specific information, please consult the website of the federal state you are travelling to, where you live or where you intend to stay, as rules may vary from state to state.
You will also find more information here.