Percocet is the most effective treatment for moderate to severe pain. It contains oxycodone, a powerful narcotic that works by binding with your brain's opioid receptors. Percocet works fast and lasts for several hours, allowing you to sleep through the night without waking up feeling like you need more medicine to get through the day.