Analgesics work by various mechanisms, including aspirin, which inhibits prostaglandins and inflammation, and slows transmission of pain signals, and opioids, which decrease transmitter release from primary sensory neurons and post-synaptically inhibit secondary sensory neurons.