Halacha forbids ill patients from taking medications on Shabbat under certain circumstances, as discussed by the Shulhan Aruch (Orah Haim 328). The Sages enacted this prohibition out of concern that a person in need of medication might grind herbs to prepare the medicine, and since grinding constitutes a Torah prohibition, the Sages forbade taking medicine as a safeguard against Shabbat desecration.
Maran, in Bet Yosef (Orah Haim 328; listen to audio recording for precise citation), addresses the situation of a healthy person who wishes to take medicine as a preventative measure, or to strengthen his body. If one does not suffer any ailment, but nevertheless wants to ingest medication to help him maintain good health, may he take medicine on Shabbat? Maran writes that the Sages’ enactment forbidding medication on Shabbat does not apply in such a case. The prohibition was enacted only for those who require medication for some ailment, but not for those who are perfectly healthy. Therefore, it is entirely permissible to eat foods or drink beverages that are made especially for medicinal purposes, or to take pills and the like, if one is not sick and simply wishes to strengthen his body and maintain good health. This Halacha is noted by Rabbi Moshe Halevi (Israel, 1961-2001) in his work Menuhat Ahaba (p. 515; listen to audio recording for precise citation).
By the same token, it is permissible on Shabbat to take medications that have no healing effect, but serve to regulate certain functions of the body. Common examples are pills taken by women to increase fertility, and contraceptive bills. (Needless to say, we refer to situations where the woman received Rabbinic approval to use birth control.) These pills do not heal or cure any ailment, and serve simply to regulate hormones. As such, a woman is allowed to take these pills on Shabbat, as they are not included under the prohibition of medication. This is the ruling of several authorities, including the Helkat Yaakob (Rabbi Mordechai Yaakob Breish, Poland-Switzerland, 1895-1976; Siman 23), Shemirat Shabbat Ke’hilchatah (Rabbi Yehoshua Neubert, contemporary; Siman 34), and Rabbi Moshe Halevi (Menuhat Ahaba, ibid.). Rabbi Moshe Halevi adds that a woman may even begin taking these pills on Shabbat. Even if she had not been taking them before Shabbat, she may begin on Shabbat, since these pills are not included under the prohibition against taking medication.
Summary: Halacha forbids taking medication on Shabbat under certain circumstances. This prohibition does not, however, apply in cases of a healthy person who takes pills to maintain his health, or pills that regulate certain functions of the body. Hence, a woman may take birth control pills (assuming she received Halachic permission to use birth control) or fertility pills on Shabbat.