When you are withdrawing from a substance, like heroin, your body has gotten used to this substance, and now it is removing it from your body. This causes symptoms such as cravings, vomiting, and depression.