In California, and probably other states, Residential Treatment Center (RTC)'s have various levels of security from a lockdown "boys' ranch" type place out in the middle of nowhere to a house in a residential area such as the one my son was court-ordered into.
At his house, there are usually around 6 to no more than 10 boys, living 2 to a bedroom, and they have around-the-clock supervision from staff. The staff takes care of meal preparation and taking the boys to and from school, shopping, the gym, church, and other recreational activities. A psychiatrist and psychologist come in one or more times a week to conduct individual and group counseling where they address individual issues such as drug/alcohol use/abuse, anger management, etc.
Their every word and action earns them points which translate into privileges such as a later bedtime, access to electronic equipment (video games, CD players, etc.) special trips, and coming home to visit on weekends.
My son's program is a step-by-step process, similar to earning badges in Scouts, where each step has to be completed before he can "graduate." The most important step that must be completed before graduating the program is graduating from high school.
The bottom line, from what I have been told, is behavior modification, getting a diploma, education and skills to avoid drug/alcohol abuse, job training when they earn that "privilege," and other skills so that they can function appropriately and productively (and independently, if they so choose) once they're released.