Confused

Kiana

Soo I’m a virgin and I’m seriously confused on how birth control works. If you take it for a while while having unprotected sex and then stop taking it because let’s say for example, you and your bf broke up, will you still get pregnant?