There are some women who already take regular prescribed medications before they become pregnant. If this is the case, you should see your specialist physician or doctor before you start trying to conceive your baby. This gives you the opportunity to discuss whether you need to continue taking your medications and/or whether your medications need to be reduced or changed to something different (to minimise the risks to your baby). If your pregnancy is unplanned, you should contact your doctor as soon as you think you might be pregnant (or your pregnancy is confirmed with a test).
A few women will have chronic health conditions (such as epilepsy, and diabetes) that require them to continue taking medications during their pregnancy. This is because the risks of the health condition not being treated outweigh the risks of taking the recommended medications. The general aim is to have a healthy mother, because if a pregnant woman is unwell, then this is not good for her baby. For example, the risks of a woman experiencing uncontrolled epileptic seizures are generally outweighed by the risks of her continuing to take medications to control her seizures, even though many antiepileptic medications are known to increase the chances of her baby developing birth defects. Yet up to 95% of women taking antiepileptic medications will still have a normal, healthy baby.
There are few circumstances where particular medications are advised to be weaned down, stopped or avoided completely during pregnancy. For example lithium is usually prescribed for manic depression (a mood disorder). This drug often needs to be slowly reduced over several weeks before conceiving, or the doctor may recommend stopping the drug more rapidly (possibly substituting it for something else). This should only ever be done with medical supervision.