Registering a will is not compulsory. In case you decide to register the will, you may do so personally or through an authorised agent. You have to deposit the will in a sealed cover with your name on it and of your agent (if any), along with a statement of the nature of document to the Registrar of Sub-Assurances of local division. Once the Registrar receives the cover and is satisfied, she will keep the sealed cover in his custody.
Generally, you do not have to pay stamp duty on wills. However, you will have to pay registration fees which will differ in different states. Procedures might also be different.
If you want to recover the will (say for changing it or for revoking it), you may apply either personally or through a duly authorised agent to the Registrar and if the Registrar is satisfied that either you or your agent have applied, she will return it. On your death, a person can make an application to the registrar to allow to get the will or see the contents of the will.
If you’ve made changes to the will through a codicil, you should ideally get it registered in the same manner.