A capital gain is the profit when you redeem units for more than you paid. The holding period decides whether it's taxed as short-term or long-term, and equity vs debt funds have different thresholds and rates.
Tax is triggered only on redemption, not while you stay invested - another reason long-term holding is tax-efficient.