Demat refers to a dematerialised account.
Just as you have an account with a bank, you need to open a demat account if you want to buy or sell stocks. It is just like a bank account where actual money is replaced by shares.
Let's say your portfolio of shares looks like this: 40 of Infosys, 25 of Wipro, 45 of HLL and 100 of ACC.
All these will show in your demat account.
So you don't have to possess any physical certificates showing that you own these shares. They are all held electronically in your account.
As you buy and sell the shares, they are adjusted in your account. Just like a bank passbook or statement, you will get periodic statements of holdings and transactions.