Opioid antagonists are medications that bind to opioid receptors in the body but do not activate them. Instead, they block the effects of opioid agonists, such as morphine or heroin. The primary function of opioid antagonists is to reverse or inhibit the physiological effects of opioids, making them crucial in the treatment of opioid overdose and addiction.