This is a TL;DR version of a more detailed post on Mutual Fund taxation here.
Mutual Funds are probably the most tax efficient investment options out there for both equity and debt.
Taxes are applicable only when you sell and only on the gains made on the units being sold.
For Resident Indians, the tax applicable is NOT deducted by the Mutual Fund. Tax is to be paid by you before the financial year ends on your own. For NRIs, the Mutual Funds will deduct the tax (TDS) from the investments when you withdraw the money.
Taxes depend not only on amount of gains but also on the type of investment (equity or debt) and the length of time the investment is held for (short term or long term). See the summary table below.
*indexation means after subtracting inflation from your overall returns i.e. if overall returns are 8% and inflation is 7% then tax applicable is 20% of (8%-7%) = 20% of 1% = 0.2%.
Debt Mutual Funds are 10 times more tax efficient than Fixed Deposits while providing similar safety and returns because of indexation benefits. In FD all gains are taxed at your current income tax level irrespective of how long the FD was kept for. So in this example if you are in the 30% bracket, your tax applicable would be 30% of 8% i.e. 2.4% - more than 10 times than that of debt funds!
[Advanced stuff] Capital Losses: In case of losses in one investment, a tax deduction can be claimed for profits in another investment. These deductions can also be carried forward to be offset against future gains, if and when they happen. (This is an oversimplified version of taxation of losses - you can ignore it for now, you will know when you need it).
Whenever you consider selling your investments, take into account the potential tax implications or they could eat into your returns. More reasons to stay invested for the long-term. :)
ICICI Prudential AMC Tax Reckoner 2017-18