The pill and sex

I’m not too informed on how the pill works. If you are on the last week of the pill/the white pills are you protected for that week? Like if I had sex with no condom on my last week of the pills what are the chances of getting pregnant? (Please don’t belittle, educate me please😂)