Medications are often prescribed for short-term pain relief after surgery or an injury. Many types of medicines are available to help manage pain, including opioids and non-steroidal anti-inflammatory drugs (NSAIDs). Your doctor may use a combination of medications to improve pain relief and to minimize the need for opioids.