How does CBD oil help manage pain and inflammation in the body?

How does CBD oil help manage pain and inflammation in the body?