Are DEMAT & the Trading Account the same?
Just like you have a savings account at the bank to store your money, similarly one has a DEMAT (de-materialised) account to store one's shares which are virtual tokens which have not been replaced by physical paper shares. These virtual shares tell you what shares you own, the price of those shares and the number of shares.
The DEMAT account does not trade (buy or sell) for you at the stock market. To invest in stocks you still need a trading account which will act as an interface between your DEMAT account and the stock market and allow you to buy and sell shares.
Let's quickly examine the entire process to understand how the entire transaction happens. Suppose you are interested in buying shares of a company XYZ which are at Rs 50 a share. You determine that you want to buy around 100 shares of XYZ, so you transfer Rs 5,000 from your savings account. Once this transfer happens, you log into your trading account and using the money you just transferred, you buy 100 shares of XYZ for Rs 50 which costs you Rs 5,000 and you pay Rs 25 extra as brokerage. The shares that you bought are now transferred through your trading account from the stock market to your DEMAT account where they will be stored till you decide to sell them. What remains in the trading account is Rs 5 which is the balance of what you transferred from the savings account and what you spent at the stock market.
When you want to sell, the same procedure happens in reverse. You first log in to your trading account and pick out the 50 Shares from the DEMAT account of XYZ company and seeing that they are now at Rs 80 a share, sell them at the stock market. 50 Shares make their way from your DEMAT account to the stock market through the trading account and are sold and Rs 4,000 are credited to your trading account which you can transfer back to your savings account. In the end this leaves you with Rs 4,000 Rs in your savings account, Rs 5 in your trading account and 50 shares of XYZ company in your DEMAT account.
So remember, that the trading account is the account through which all transactions are made and your money kept ready for trading whereas the DEMAT account is the place where your shares are stored till you decide to sell them.