Xanax (Alprazolam) is a medication commonly prescribed to treat anxiety, panic attacks, and stress. It works by affecting the chemicals in the brain that may be unbalanced in people with anxiety or panic disorders. Xanax helps to calm the nervous system and can provide fast relief from overwhelming feelings of anxiety.