What should I do if I get pregnant while on birth control?

Stop them . Stop the pill immediately. Fortunately the chances of any serious problem occuring are minimal if you stop it by 10 weeks or so.
Don't Worry. Oral contraceptives as well as vaginal contraceptives have been extensively studied and show no harmful effects to the fetus. You should obviously stop them as soon as you find out you are pregnant. Do not worry and take your prenatal vits and iron.
Speak with your GYN. The first step is to speak with an ob/gyn. He/she will need to know what type of contraceptive you were using. I presume by your question you mean the "birth control pill." in general, women who conceive while on the birth control pill, do not suffer any adverse effects with their pregnancy and there is no conclusive evidence that the birth control pill will cause any birth defects.
See your doctor. With most methods of birth control you can simply stop what you were doing and see your doctor. Birth control pills, patches, vaginal rings, implants and depoprovera usually will cause no long term problems for the pregnancy. If you are pregnant with an IUD it is crucial to make sure the pregnancy is inside the uterus and not in the tubes --an ectopic pregnancy.