All medicines are drugs, but not all drugs are medicines.
A drug is just a substance that produces changes or reactions once they get inside the body, these could be positive, negative or even neutral based on your interpretation of the effects.
In order to think of something as a medicine, those effects need to be positive and aimed at improving the health of the person that receives them.
But, if you are asking about the pejorative way of using the word drug, then any substance that is recreational and not thought of as acceptable by society could be considered a drug. Even if they have medical uses or potential for its benefits to outweigh the negatives in the treatment of some conditions.