How to invest in shares through demat account

What are the steps to invest in shares through a demat account?,