Use the noun narcotic to talk about a pain relieving or sleep inducing drug and the adjective narcotic to describe anything that has these same effects.
Patients who have their wisdom teeth removed are often given a narcotic to ease their pain afterward. A numbing drug is usually just what they need to recover — that and plenty of ice cream. If a hot bath and a cup of tea make you incredibly drowsy, you can say that they have a narcotic effect on you. In the United States, narcotic drugs are illegal without a doctor's prescription — narcotic often has a negative connotation, especially when it's used in news reports.