You can get pregnant even if you are breastfeeding your baby, and before your periods have restarted. If you are having sex and you don’t want to get pregnant you should start using contraception from three weeks after your baby is born, even if you are breastfeeding.
Source: Sex myth buster @ NHS Choices
image by Anqa under CC0 license