What are the steps to open a demat account

What detailed steps are necessary to open a demat account?,