Intill how many weeks abortion pill work

Intill how many weeks could you take abortion pill and what would happen if you take it in your second third trimester would it still work?