When someone continues to use a substance even when it no longer provides pleasure, it’s called the pathological pursuit of rewards, or addiction
Usually, it takes some time for a drug to begin to change the brain’s reward system to the point that a person forms an addiction, but some drugs can do so very quickly