A term of varied usage. In medicine, it refers to any substance with the potential to prevent or cure disease or enhance physical or mental welfare.
In pharmacology, it refers to any chemical agent that alters the biochemical physiological processes of tissues or organisms. Hence, a drug is a substance that is, or could be, listed in a pharmacopoeia.
In common usage, the term often refers specifically to psychoactive drugs, and often, even more specifically, to illicit drugs, of which there is non-medical use in addition to any medical use. Professional formulations often seek to make the point that caffeine, tobacco, alcohol, and other substances in common non-medical use are also drugs in the sense of being taken at least in part for their psychoactive effects.