Various studies have looked at the use of different forms of cannabis (THC, CBD, combinations of both, and whole flower) in different types of chronic pain (such as that from nerve, joint, inflammatory, cancer, musculoskeletal). Overall, the results are promising.
One advantage of cannabinoids is that, unlike opioids (a common form of potent pain killer), they seem to have a safer side effect profile. In situations where too much is taken, opioids are known to cause a person to stop breathing. The same does not happen with cannabinoids. Whilst cannabis oil can cause side effects like with any other medication, these generally tend to be mild and can go away by themselves over time.