Since the establishment of the nation's first "drug court" in 1989 in Miami-Dade County, Florida, the concept has spread across the country to the extent that, according to the National Association of Drug Court Professionals, there are now over 2,700 Drug Courts operating across the country.
Because drugs abuse has proven a particularly difficult, if not impossible, area of criminal law in which to adjudicate fairly, given the public health aspect of the crime as well as legal aspect -- in effect, the mere fact of the illegality of the chemical substances being used -- court officials and observers considered alternative means of dealing with the continuing flow of drug cases involving many of the same individuals. The answer was the establishment of Drug Courts. Serious problems of prison overcrowding, combined with the nonviolent crime of drug possession or use (assuming the case in question does not involve a violent crime associated with illegal drugs, for example, street crime involving competing drug traffickers; burgerlies conducted by drug addicts seeking financial resources for drug buys, etc.) created a need for an alternative means of adjudicating drug cases.
The health aspects of drug addiction, as noted, makes drug crimes somewhat unique. There is among many observers of the criminal justice system a need to handle drug abusers from as much, or more, of a health perspective as a punitive one. The prevalence of drugs inside prisons is one factor arguing for treatment of addicts in alternative settings rather than putting them into overcrowded prisons where drugs are readily available. Imprisoning drug addicts does not help them overcome addiction; placing them in supervised rehabilitation centers can prove more beneficial, and less expensive if the drug addict is cured of the addiction.
With regard to how the courts operate, the following description from the Sentencing Project's report "Drug Courts: A Review of the Evidence," will help answer the question:
"There are generally two models for drug courts: deferred prosecution programs and post-adjudication programs. In a deferred prosecution or diversion setting, defendants who meet certain eligibility requirements are diverted into the drug court system prior to pleading to a charge...Failure to complete the program...results in prosecution. Alternatively, in the post-adjudication model, defendants must plead guilty to their charges but their sentences are deferred or suspended while they participate in the drug court program. Successful completion of the program results in a waived sentence and sometimes an expungment of the offense. However, in cases where individuals fail to meet the requirements of the drug court (such as a habitual recurrence of drug use), they will be returned to the criminal court to face sentencing on the guilty plea."
That sums up the system pretty well. As to how well Drug Courts work, a 2012 article in the Journal of Criminal Justice concluded that recidivism rates for those who those who take part in Drug Court-ordered rehabilitation programs are lower than for drug addicts who decline the option.["Assessing the Effectiveness of Drug Courts on Recidivism...," Issue 40, 2012] Conversely, an eNotes document, accessed through the link below, presents the argument for the ineffectiveness of Drug Courts.