Unprotected sex on the pill

Ashley
How long do you have to be on the pill (I take Otho Cyclin) in order for it to prevent you from getting pregnant?