Birth control stops the sperm and egg from joining (fertilization).
It can also prevent a fertilized egg from implanting into the uterus. Birth control is NOT 100% effective but can play a huge role in preventing pregnancy.
Pregnancy can happen anytime there is penis-and-vagina sex, when a sperm (from the testicles) fertilizes an egg (from the ovaries), which then implants into the uterus wall and grows into a baby.