Is withdrawal effective

So I’m not on any kinds of birth control and I don’t use condoms... I’m not trying to get pregnant either. Is withdrawal before he cums effective or can I get pregnant in that case. I’m mmmm hell class we learned that we can still get pregnant. Help!!!