Purpose of an antistatic wrist band

What is the purpose of an antistatic wrist band? How does it work?