birth control

when taking the pill how long until it is effective?