How to buy ipo through demat account

How to apply for an IPO using a Demat account?,