If you buy a stock, then you can sell it off only after the T+2 settlement takes place. If you try selling these stocks on the same day or before these stocks have been delivered to your Demat account, then your order will get rejected.