Plan B pills

Chaunice
Does the plan b pill actually work? If so how long after unprotected sex can you take one?