How does distraction work in the management of pain?

How does distraction work in the management of pain?