How does the plan b pill work

So my older sister had to take it yesterday and I was just wondering how it works and what it actually does. When to not take it and is it okey to take it when you feel the ovulation symptoms. I was too embarrassed to ask my sister because I’m 23 so I feel like I should already know this...