Female oral contraceptives or birth control pills contain various forms of synthetic (man-made) hormones such as estrodial and progesterones, both female hormones that regulate the female ovulatory (monthly period) cycle.
When we take birth control pills, we change the lining of the mucosa which can be thick and thin during the female cycle. Thick mucosa will prevent bacteria, and off course sperm from entering the reproductive tract. Thin mucous will allow sperm to enter the reproductive tract. Furthermore, there are some other physiological changes that occur due to these hormones and prevent pregnancy through other mechanisms.
Basically birth control pills prevent pregnancies, but are not 100% effective. For example, if a female takes antibiotics, or has diarrhea, then the birth control will not be properly absorbed by the intestinal tract. Not enough estrogen means risk of pregnancy. Eating grapefruit will also prevent absorption of various drugs.
Birth control pills will also NOT PREVENT infection from sexually transmitted diseases such as HIV/AIDS, gonorrhea, Human papilloma viruses, and other diseases.
It is recommended that one should use condoms in addition to birth control!
Birth control pills are associated with lower rates of ovarian cancer, but can also be associated with increased risk of breast cancer, especially in smokers, women with the BRCA1 genetic mutation, and other risk factors.
Birth control pills have not been associated with infertility, however, long term effects on the body are unclear and have not been fully investigated.
Birth control pills are associated with increased risk of embolism (blot clots).
It is recommended that women not use birth control pills for more than 8 years consecutively!
This is because it increases adverse health risks. For example, estrogen replacement therapy when taken for long continuous duration, is associated with increased risk of breast cancer. Furthermore, as mentioned earlier, estrogens are associated with embolism (blot clots).
Hope that helps.