Birth Control Pill

How long do you need to take the birth control pill for it to be effective?