How does CBD oil work for pain relief and is it effective?

How does CBD oil work for pain relief and is it effective?