Generally, the contraceptive lasts only as long as you are using them. When you stop using a contraceptive then your ability to have a baby returns immediately.
There a few exceptions to this, which are the permanent methods, such as a vasectomy or tubal ligation, or the injection, after which your fertility can take a few months to return.
Don't delay if you want contraception and you’ve recently had a baby or just had an abortion. If you have unprotected sex you are at risk of another pregnancy very soon after these events. Talk to your doctor, midwife, nurse or pharmacist about your contraceptive choices.