very simple way
You buy a stock at $20 and sell it a $30 you have a capital gain of $10. On the other hand, you could buy a stock at $20 and it falls to $10 and then you sell for a loss. You then have a capital loss of $10.
Dividends are typically associated with stocks but also index funds etc. As a shareholder you in principle are a owner of the company. The dividend is your respective share of the companies profits after the company handles its expenses.
The dividends are considered a form of capital gains and are part of your taxable income each year.
This post was edited on 6/5 at 12:26 pm