How does CBD affect pain?

How does CBD affect pain?