How to buy mutual funds through demat account

How to buy mutual funds directly through a Demat account?,