How does CBD oil help with pain management and is it safe to use?

How does CBD oil help with pain management and is it safe to use?