Birth Control

Can birth control act as a Plan B? I had sex today and I don't know if he pulled completely out in time, if I take my pill on time tonight, what will happen?