You choose how long to deposit, and the bank tells you the rate before you commit. Taking the money out early usually means a penalty.
The interest is added to your income and taxed at your slab rate. Deposit rates change with the market, so a rate you see today may not be offered tomorrow.