A woman is most fertile at the time of ovulation (when the egg is released from the ovary), which usually occurs 12 to 14 days before the next period starts. This is the time of the month where a woman is most likely to get pregnant.
If your cycle is 35 days long, you are not going to be fertile on the 14th day of your menstrual cycle. You are likely to be fertile around 19-25 days. If you have a shorter menstrual cycle, then you might ovulate around 7-13 days.
Sperm can live up to 5 days in the female body waiting for eggs. If you weren't ovulating, when you had sex, sperm can still meet up with your egg later on.
It can also happen that you can be pregnant immediately after your period. Even if you ovulate earlier or later, if sperm would be present in your body you can conceive. So, it is quite safe to use birth control or condoms to prevent pregnancy.