Everything you contribute has deferred taxation, which means that employees are taxed on the amounts at the time of receiving the benefit. What is taxed is all the contributions and the difference between the contributions and what is received (the capital gains).
In other words, capital gains refer to the increase in the value of something over time. For example, if you contribute €100,000 and then, after some years, it increases its profitability and you end up with €150,000. The difference of €50,000 is the capital gains.
In summary, capital gains are the profit you make when something increases in value from what you paid for it. It's like earning extra money due to the increase in the value of your investments.
When you pay taxes on the earnings from your work, any additional income you earn from other sources, such as an investment, will be added to what you're already paying taxes on from your salary. In other words, if you earn extra money from an investment, you'll have to pay taxes on that additional money, in addition to the taxes you already pay on your salary.