Analgesics, more commonly known as "painkillers" are drugs designed to relieve pain. They differ from anesthetics in that they reduce pain only, not all sensation. There are generally two types of analgesics: NSAIDs and opioids.
NSAIDs (non-steroidal anti-inflammatory drugs) reduce pain by inhibiting the cyclooxygenase enzymes which are key to inflammation. By stopping the "inflammation messengers" from completing their signal, NSAIDs are able to reduce inflammation-related pain. The most popular non-prescription NSAIDs are: acetylsalicylic acid, ibuprofen, naproxen sodium, and acetaminophen (though some do not classify it a true NSAID). Almost all the different varieties of non-prescription painkillers are literally just one of these four basic drugs repackaged with a brand name. For example, the only medical ingredient in the brand name meds Advil, Genpril, IBU, Midol, Motrin, and Nuprin is ibuprofen.
Steroids, another popular class of painkillers, however they cannot be obtained over the counter but must be administered by a physician. Similar to NSAIDs, they reduce pain by inhibiting inflammation. One of the most common anti-inflammatory steroid treatments is a cortisone shot. This is when a doctor applies the steroid cortisone (which is a natural hormone secreted by the adrenal gland just above the kidneys) directly into the source of the pain with a needle. The advantage of this topical approach over a systemic ingestion (such as eating a pill) is that the steroid is concentrated directly into the area where it is needed, ensuring minimal side-effects since it is not dispersed throughout the body by the bloodstream.
Opiates address pain in a different manner than steroids and NSAIDs: rather than inhibiting the cause of the pain (as is the case with inflammation-related pain and anti-inflammatories), opioids simply interfere with the nervous system's ability to transmit the pain. So they do not actually fix the injury, they just stop the patient from being able to feel it. Opioids like morphine are tremendously useful painkillers but carefully controlled substances due to their potential for abuse, as is the case with heroin (diacetylmorphine) which is also an opioid.