How to set up a demat account

What is the setup procedure for a new Demat account?,