Can you have unprotected sex w birth control pills?

I asked my doctor if I could have condomless sex combined with birth control pills and she said yes the pills will protect me from pregnancy but I’ve heard lots of conflicting information so I just want to hear opinions