You have to pay taxes on your capital gains to the income tax department. The difference between purchase price and the sale price is defined as capital gain. If you buy and sell within 3 years, then short-term capital gains are taxed at the marginal rate If you sell after 3 years, then long-term capital gains tax rate is 20% with indexation benefit
This can be explained as follows :
Let's say you bought a debt fund for Rs. 10,000 in 2011-12 and you are selling it in 2012-13 for Rs. 11,000. This means, your short-term capital gain is Rs. 1,000. On this, you would have to pay a tax of Rs. 300 if you're at the highest income level with 30% taxable income.
If you sell your funds after 3 years in 2014-15 for Rs. 13,300, when you adjust for indexation the cost of purchase is considered as 10,000 x 1024/785= 13,044.
This means your indexed long-term capital gain is Rs. 266 and your tax amount will be only Rs. 53.20.
(Note: 1,024 is CII for 2014-15 and 785 is CII for 2011-12. This is published by IT department every year)