Plan b

When should I take plan b ??? How long after sex