How to buy shares using demat account

What is the basic method for buying shares using any demat account?