It depends on.... The medication. Some medications are safe in pregnancy, some are absolutely contraindicated and some we simply don't know one way or the other. You need to discuss this issue with you obstetrician and be absolutely certain about any medication, over the counter agent, dietary supplement, etc. Before you take it. The stakes are just too high.
Yes. It is fine to continue many medications during pregnancy but there are always exceptions. Sometimes doses need to be adjusted during a pregnancy, or alternative medications found. Please talk to your doctor about your medications---preferably before you even get pregnant so you know which ones are safe.