Birth control pill

How long does it take for the pill to kick in? Like if I was late one day buy been on track for the past two, am I good to have sex and be able to be protected from a baby lol?