In forex markets, the interest owning or paid is calculated only on positions held overnight (with the close of day usually considered to be 5 pm North America Eastern time). If a trade is entered during a day, and exited before the end of the day, it neither earns interest nor incurs interest charges.
The interest rate paid on the purchased currency, or charged on the sold currency is based on the prevailing interest rate associated with each currency. For example, if a trader buys USD/JPY, the trade earns currency at the rate paid in the U.S.A., and pays currency at the prevailing borrowing interest rates charged in Japan. Those rates can differ substantially.
Bank accounts are classic compounding vehicles. A key feature of most savings accounts is the interest they pay, which will typically be higher than interest you can earn on checking accounts. (Many checking accounts pay no interest at all. You can also earn compounded interest in money market accounts and certificates of deposit (CDs).
It's important to understand that the compounding is at work in scenarios other than interest, too. Think, for example, of stocks that pay dividends. If you reinvest your dividend payments into shares of more stock, then those shares will grow, too, ideally kicking out dividend payments of their own. The reinvestment can help your portfolio grow faster than it otherwise would, if you didn't reinvest those sums.
Interest comes in two primary varieties: simple and compound. If you have $1,000 in an account that pays you 3% simple interest annually, you'll collect $30 each year. If the interest is compound, then you will get $30 in your first year, and if you have $1,030 in your account the next year, you'll collect 3% of that, or $30.90. That's compounding doing its thing.