You are taxed only when you redeem, and only on the gain. Hold ₹1 lakh that grows to ₹1.4 lakh and sell: the ₹40,000 gain is taxable, the ₹1 lakh is not. Until you sell, nothing is due, however much the NAV rises.
How the gain is taxed depends on two things: whether the fund is equity-oriented (65 percent or more in Indian shares) and how long you held the units. Equity funds held more than a year get the long-term rate; less than a year, the short-term rate. Debt funds bought after April 2023 are taxed at your income slab regardless of holding period.
IDCW payouts are added to your income and taxed at your slab. Each SIP instalment has its own purchase date for the holding-period test. Rates change in Union Budgets, so confirm the current figures before you redeem a large sum.
Tax arrives only when you sell, and only on the gain. Holding is free.