The primary treatment for an opioid overdose is the administration of naloxone. Naloxone is an opioid antagonist that can rapidly reverse the effects of opioids, particularly respiratory depression. It is available in various forms, including injectable and nasal spray. Immediate medical attention is crucial, as naloxone's effects are temporary and additional doses may be necessary.