Plan B?

I had sex on Sunday and it was the end of my period and he came in me and on Monday I took a plan b and then I had sex last night and he came in me. Does the plan b work for a couple days or is it just protect one night of unprotected sex?