You will need two types of accounts to invest in the stock markets. Firstly, the trading account where all your transactions in the stock markets take place. The second, is the demat account where all the securities purchased by you are kept in the electronic form.
You cannot have more than one trading account in your name with the same broker. Also, you cannot add another person to your individual trading account because more than one person is not allowed to have access to a single trading account.
Whereas, you can have a joint demat account with upto three holders. But, all communication regarding the account will be provided to the first holder only. Even a joint demat account is bound to an individual trading account only. Hence, any taxation on the P&L would be the liability of the primary/first holder of the joint demat account.