Becoming pregnant can take a long time. However, there are times when it may be wise to visit a doctor if you are unsuccessful after a long time. Here are some guidelines that can help.
If you are under 30 and you cannot conceive after one year of regular sex, you and your husband should see a doctor.
If you are over 30 and cannot conceive after 6 months of regular sex, you and you husband should see a doctor.
If you have other fertility challenges like irregular cycles or have had previous miscarriages, you do not have wait for the periods above. You should go seek a doctor's advice as soon as possible.
Also do not get stressed about not getting pregnant. It cannot happen instantly and stressing about it can decrease your chances even more. But do keep in mind that it may take 1 to 2 years for you to get pregnant. About 16% of couples cannot get pregnant even after 1 year of trying1. So take a deep breath, relax and keep trying and when necessary, go see a doctor.
References
1. Guidelines of the Royal College of Obstetricians and Gynaecologists via US National Guideline Clearinghouse