Scabies is acquired from other people, usually skin-to-skin contact. You can, however, get it from sleeping in the same bed as an infected person or using the same towels, etc.
The most common treatment is a topical cream called elimite. In adults, it is applied with your bare hands from the neck down and left on overnight. Don't wash your hands after. In children under 2 years of age, the head and neck should be included as well. Every part of the body must be covered including under the nails, between the fingers, the penis or pubic area, the entire back, etc. If one person in the household misses one spot, it can all come back. Usually the treatment is repeated in 7 days.
Ivermectin is a pill that treats scabies. It is taken once and repeated in 7-14 days. Many times, the two treatments are combined.