When a company floats its IPO, it attracts bids from potential investors. You can place your bid through an online stockbroker to receive the allotment of IPO shares. In case you get the allotment, the shares are credited directly to your Demat account.