Plan B?

Can someone explain to me how Plan B works? I just had sex and didn’t realize that I started my fertility window today😬 I used a condom but am not on the pill.