Oxycodone is a prescription medication used to treat moderate to severe pain. It works by acting on opioid receptors in the central nervous system, reducing the sensation and emotional response to pain. Oxycodone is a prescription medication used to treat moderate to severe pain. It works by acting on opioid receptors in the central nervous system, reducing the sensation and emotional response to pain.