Once you are pregnant, there are no medicines you can simply take in order to stop being pregnant. There are a lot of things you should not take if you want a healthy baby, but those do not necessarily stop a pregnancy.
Rather than planning to take out a pregnancy if you ever get pregnant, you are MUCH better off to prevent getting pregnant in the first place, by using condoms, birth control pill or IUD, or both.