Xanax is the brand name for alprazolam, a medication prescribed to treat anxiety and panic disorders. It belongs to a group of medicines called benzodiazepines, which work by calming the nervous system. Doctors prescribe Xanax only after evaluating a patient's symptoms, medical history, and overall health.