First-time homebuyers can withdraw up to $23,000 tax free from their RRSP to put towards the purchase of an eligible property. To qualify as a first-time homebuyer, you cannot have lived in a home that you or your spouse/common-law partner owned in the past 4 years. 
Any amount withdrawn under the HBP must be re-contributed to your RRSP. You have up to 15 years, starting the second year after your withdrawal, to re-contribute. If you do not re-contribute in the 15-year period, you will have to pay income tax on the outstanding amount.