When I invest in ETFs and I generate profit, do I have to pay taxes for the distribution or the appreciation of value of my ETF positions? If yes, how to pay these taxes and where? Is this automatically done by my depot and my transactions inside the depot? So automatically via my bank?
Do I have to pay taxes on the distributions?
Yes, you generally pay Kapitalertragsteuer (the capital gains tax), Solidaritätszuschlag (the solidarity tax), and (if you are registered as a member of a religious organization) Kirchensteuer (the church tax). If the ETF is registered in a foreign country, you may also have to pay Quellensteuer (the withholding tax) in that country.
Do I have to pay taxes on the appreciation of value of my ETF positions?
Kind of. Starting 2018, every year you pay the difference between what is called Vorabpauschale and the amount of the received distributions (as long as such difference is positive), however, no more than the difference between the repurchase prices of the fund at the end and at the beginning of the year. Vorabpauschale is computed as a percentage of the fund price at the beginning of the year, see this explanation for details.
The advertised goal of this Vorabpauschale scheme is getting money from the owners of thesaurierende ETFs (ETFs that do not pay dividends but rather reinvest them), who enjoyed tax deferral so far. You probably will not need to pay anything for a distributing ETF (unless it grows and pays little dividends). Anyway, you will be able to deduct the payed amount from the taxes on realized capital gains while selling the ETF (see the last paragraph in Section 5.2 here).
How to pay these taxes and where?
In the beginning of each year you file Einkommensteuererklärung (a tax return) for the previous year to Finanzamt (the German tax agency). In Anlage KAP (attachment KAP) of the tax return you specify all the numbers that are needed to calculate the amount of tax that you owe to the state due to the income from capital investments. These numbers will be provided to you by your bank/broker in a special form called Jahressteuerbescheinigung, you will just need to copy them into Anlage KAP.
After your tax return is processed you will receive a letter from Finanzamt stating how much money you owe to the state and where to transfer it. If you overpaid taxes, the state will transfer the excess amount to the bank account that you specified in your tax return.
Is this automatically done by my depot and my transactions inside the depot?
Yes. German brokers will withhold the necessary amounts automatically to make sure you do not underpay taxes. However, you may pay more than necessary. For example, the brokers are not obliged to subtract the already payed Vorabpauschale from the taxes payed during selling on profit. You will need to file a tax return to get the money back.