Drug addiction, or dependence, is the compulsive use of a substance, despite its negative or dangerous effects.
However, a physical dependence on a substance (needing the drug to function) is not always part of the definition of addiction. Some drugs (for example, certain blood pressure medications) do not cause addiction but they can cause physical dependence. Other drugs cause addiction without leading to physical dependence. Cocaine is an example.
Tolerance to a drug (needing a higher dose to attain the same effect) is usually part of addiction.