How demat account works in india

How does a Demat account function in India’s market ecosystem?,