Thanks to @DesertDave I just remembered one of my favorite subjects in psychology school: Addictions and withdrawal. Here I will answer your question. What is the difference between a drug and medicine?
I'm going to quote the DSM-5
The DSM-5-TR recognizes substance-related disorders resulting from the use of 10 distinct classes of drugs: 2
Alcohol Caffeine Cannabis Hallucinogens Inhalants Opioids Sedatives Hypnotics or anxiolytics Stimulants (including amphetamine-type substances, cocaine, and other stimulants) Tobacco While some major groups of psychoactive substances are specifically identified, the use of other or unknown substances may also form the basis of an addictive or substance-related disorder.
Activation of the brain's reward system is central to problems arising from drug use. The rewarding feeling people experience from drug use may be so profound that they neglect other normal activities in favor of using the drug.
The pharmacological mechanisms for each class of drug are different. But the activation of the reward system is similar across all substances in producing feelings of pleasure or euphoria, often referred to as the "high."
The DSM-5-TR recognizes that not all people are automatically or equally vulnerable to developing substance-related disorders. Some people have lower levels of self-control that predispose them to developing problems if exposed to drugs.
Substance Use Disorders Versus Substance-Induced Disorders There are two groups of substance-related disorders: substance use disorders and substance-induced disorders.
Substance use disorders are patterns of symptoms resulting from the use of a substance that you continue to take, despite experiencing problems as a result. Substance-induced disorders, including intoxication, withdrawal, and other substance- or medication-induced mental disorders, are caused by the effects of substances.
DSM-5-TR Substance Use Disorder Criteria Substance use disorders encompass a wide variety of problems arising from substance use and cover 11 different criteria:
1- Taking the substance in larger amounts or for a longer period than intended 2- Wanting to reduce or stop using the substance but not being able to do so 3- Spending a lot of time obtaining, using, or recovering from the use of the substance. 4- Cravings and urges to use the substance. 5- Not being able to do what you should at work, home, or school because of substance use 6- Continuing to use, even when it causes problems in relationships. 7- Abandoning important social, occupational, or recreational activities because of substance use. 8- Using substances over and over again, even when it puts you in danger. 9- Continuing to use, even when you know you have a physical or psychological problem that could have been caused or worsened by the substance. 10- Need for more of the substance to achieve the desired effect (tolerance) 11- Development of withdrawal symptoms, which can be relieved by taking more of the substance.
The 11 criteria described in the DSM-5-TR can be grouped into four main categories: physical dependence, risky use, social problems, and poor control.
I could go on and on, but I think this explains enough to identify a drug from a medicine. In short, it just depends on the symptoms, whether you create addiction through withdrawal, length of use, and quantity.
Not all substances alter your mental state or change your perception of reality, as is the case with sugar, caffeine, tobacco, nicotine, but they can generate anxiety due to withdrawal and start the cycle of excessive consumption, and so on.
Extra fact: Nicotine is the most addictive of all according to the DSM-5