A Demat account is an account that is similar to a bank account. The difference is that you keep money in the bank account while the shares you buy are kept in the Demat account.
In a Demat account, you have to keep the money to buy shares but there is no need to keep any minimum balance in it, you can keep the money as you wish after the Demat account is open, you have to pay AMC (Annual Maintenance Charge) yearly.
If you have to open offline, then you have to go to the branch office of that company and fill the form, then those people ask you for xerox of all documents and they attach all those documents with your form and send them to their head office. Then the head office reviews on that application and if all the documents are correct then your share market account is opened or you can courier the head office by downloading the application farm from the direct company website and filling that form.