Drugs that bind to specific receptors and produce a drug action are called agonists. Morphine is an example of an agonist.
Drugs that bind to specific receptors and inhibit agonist drug action or cellular functions are called antagonists.
Antagonists are also known as blocking drugs. Usually, antagonists bind to the receptors and prevent other drugs or body substances from producing an effect.
Naloxone, a morphine antagonist, is administered to prevent, or antagonize, the effects of morphine in cases of morphine overdose.
There are many examples in pharmacology where drug antagonists are used to prevent other substances from exerting an effect. When both agonist and antagonist drugs bind to the same receptor and are administered together, they compete with each other for the same receptor site. This effect is known as competitive antagonism. The amount of drug action produced depends on which drug (agonist or antagonist) occupies the greatest number of receptors.
(Reference: Pharmacology, an introduction. 6th edition)