Aspirin inhibits the synthesis of prostaglandins so the inflammation response is reduced. Monoamine oxidase is an enzyme that destroys these two monoamines and can reduce their levels too much. Inhibition of monoamine oxidase prevents monoamine levels from falling too low. After serotonin is released into the synapse it is returned to the neuron by reuptake transport proteins. The serotonin reuptake inhibitors also bind to this transport protein thus preventing serontonin from binding and causing serotonin levels to rise.
Naloxone has nearly the identical structure of heroin.
It therefore binds to the opiate receptors that heroin binds to and displaces heroin from those sites. This prevents heroin from exerting its narcotic effect through the opiate receptors.