There are two primary types of analgesics: opioid and non-opioid. Opioid analgesics act centrally in the nervous system, can cause addiction and dependence, and are controlled substances. They are more potent but carry greater risks than non-opioid analgesics like NSAIDs, which act peripherally and have a ceiling effect. Both types of analgesics work through different mechanisms - opioids bind to opioid receptors while non-opioids inhibit prostaglandin formation. Overall, opioids are more effective for severe pain but non-opioids are preferable for mild-to-moderate chronic pain due to their safer side effect profile when used long-term.