Both work on the same pain receptor, the μ-opioid receptor, but tramadol has a weaker effect on the receptor than Hydrocodone.
Tramadol is also a weak serotonin and norepinephrine reputable inhibitor and is consequently used in management of neuropathic pain. Physicians may prescribe tramadol to patients whose pain is related to nerve injury, and since it’s not easily abused, to those with a history of addiction and substance abuse.