A Demat account holds shares that you buy from the stock market in electronic format. It is used for holding financial instruments like shares, mutual funds, government securities, etc.
On the other hand, a trading account is used for buying and selling shares. It does not hold your securities, so you need to link a Demat account and a bank account with it.