system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does weed relieve pain? Does it work like ibuprofen or aspirin?

How does marijuana relieve pain? Does it work like ibuprofen or aspirin?
gpt
Ibuprofen/aspirin, opiates, and marijuana relieve pain in different ways. Ibuprofen and aspirin interfere with the production of prostaglandins, which are hormones that help transmit information about pain and cause inflammation. So ibuprofen stops your body from swelling and transmitting pain at the site of the injury.

Opiates bind to opioid receptors in the gastrointestinal tract, spine, and brain, and prevent pain messages being passed through those channels.

I don't think we fully understand how marijuana relieves pain yet (there haven't been as many studies done due to its legal status), but the research so far shows that it doesn't reduce pain intensity, but rather it helps people ignore the pain or cope with it. So you might say "yeah, that stinging sensation feels like it's stinging just as much, but it's easier for me to not care about now." That different mechanism of action is one reason why it has promising medical benefits. If a patient in chronic pain doesn't respond to other treatments, then marijuana offers another way for them to get relief.