birth control and pregnancy

when does birth control actually become effective. when i can i have unprotected sex without the risk of pregnancy?