How does CBD help alleviate pain and what are the advantages of using it?

How does CBD help alleviate pain and what are the advantages of using it?