Immune to BC?

Is there a point at which you can become immune to the pill and it’s no longer effective? How long would you have to take it for that to happen?