I'm planning to become pregnant but the doctor put me on birth control?

I'm irregular with my periods so the doctor put me on the pill birth control. I know it prevents pregnancy but I don't want to prevent pregnancy I'm trying to become pregnant. Is it just to regulate my periods first an then try a little bit later? Did any of you ladies have to take the birth control pill for I'm not sure how many months then got pregnant? I've took birth control before last year then stopped. Should I just take them?