When you buy a share, the broker credits the shares in the Demat account with it and it appears in the details of your holding. If you trade through an internet-based platform, you can view your holdings online. When you sell shares, you have to give delivery instructions to your broker, in which you have to fill the details in the stock sold. The stock gets debited in your account and you pay money for the shares sold. If you pay through the internet, debit of shares and credit of amount starts appearing automatically in your account.