The chances of getting pregnant right before you menstruate, or start bleeding, are low, and they get lower the the closer you get to the start of your period.
There are 4 phases of the menstrual cycle. The stage right before your period is the luteal phase, which lasts 1-2 weeks and is right after ovulation. The exact number of days of each phase varies from person to person, and even period to period. Right at the beginning of the luteal phase you have a relatively high risk because ovulation, or the release of the egg, has just occurred. However, the egg only lasts about 24 hours after release. Therefore, as you approach your period, the chances of getting pregnant become much lower, with right before your period being extremely low likelihood of getting pregnant.
If you are on birth control, the chances of pregnancy at any time are even lower.