when i was a teen, my girlfriend had the same doubts. she called the hospital hotline for sexual related questions and they told her that if you took the pill correctly at the correct moment, meaning after the last day of your period, the protection begins right away with the first dose.
this is because your ovulation cycle is over and the pill prevents further ovulations = prevents an egg being released from your ovaries which the next time would happen 21 days after your last day of your previous period.
the pill prevents an egg being released. since you're taking the pill, there will be no ovulation. No ovulation means no egg will be released from you ovaries which could get fertilized and lead to a pregnancy (but keep in mind that you'll still get your period/flow, which btw. is a good indicator that the contraception is working).
recap: if you took the pill correctly on your last day of your period, you can begin to have unprotected sex the same day without getting pregnant.
but please keep in mind that the pill does not provide any protection against sexually transmitted diseases such as HIV, syphilis, chlamydiae, gonorrhea, herpes or any other; it just prevents pregnancy.
Disclaimer: I am not a medical doctor, gynecologist or otherwise a medical or health care professional. So I strongly recommend to get in touch with a professional in this field. there are many hot lines which specialize in this kind of questions and would be eager to help you; most of them are anonymous. Or you can just call a hospital or clinic (if you really want to stay incognito, call under a fake name) and they will get your answer in a matter of minutes if not seconds.
hope this helps