I suspect it's like laughing gas. It has more to do with making the patient not care as much about the pain (distraction) rather than direct pain management though numbing / blocking receptors.
You'd suspect wrong. It has anti-inflammatory elements along with interacting with receptors in nearly every facet of the body. It has a psychoactive element that makes it popular for recreational use, but there truly are medicinal uses for it.