There is a difference between mental and physical dependence. Physical dependence means that the body will protest when use of the substance is stopped (withdrawal symptoms). Compared to other substances this easily happens with heroin. It doesn't mean that somebody is addicted after using heroin only once, but if the use becomes more frequent, physical dependence easily grows because of the development of tolerance. Tolerance means that the body easily gets used to the heroin and that the body requires steadily larger doses to achieve the same effects.
When the heroin has lost its effect the withdrawal symptoms show up: the user feels sick, sweaty and cold, has goose bumps, a running nose, stomach ache, and pain in arms and legs. Possible symptoms are vomiting and diarrhea. These symptoms disappear as soon as heroin is used again. That is how the user easily ends up in a vicious circle. Mental dependence means that the user anxiously wants to use the substance and doesn't feel comfortable without it anymore.
Heroin causes mental dependence: it sedates everything, both physical and mental pain, which makes people with serious problems (homeless, unemployed, abused) susceptible to heroin. But also other people can easily become dependent. That is why experimenting with heroin is dangerous.
Heroin and its metabolites can be detected in urine for 24 hours, in hair samples for as long as the hair has been growing.