What many drugs and compounds do is bind to cell receptors. These receptors then change shape and various things may happen in the cell as a result (including relaying a message to other cells).
Something that binds to a receptor and causes activity is called an agonist. Something that binds to a receptor and causes a partial response is called a partial agonist. Something that binds to a receptor but does not cause activity is called an antagonist as it takes up those receptor sites meaning that nothing else can bind to them and cause and effect.
An opioid effect is one of many effects caused by opioids. Naloxone is an opioid antagonist. It binds to the same receptors as opiates but without causing an effect. If a normal person has naloxone it won't actually cause an effect. If someone who has taken an opiate takes naloxone however, the naloxone will compete for receptor spots, knocking off the opiate and reversing the opiate effect. Also, if someone takes naloxone and then immediately has an opiate, that opiate will not work particularly well as some of those receptors are already taken up with naloxone.
Hope that helps.