Xanax is a brand name for the medication alprazolam, which is a benzodiazepine commonly prescribed to treat anxiety disorders and panic disorders. Xanax works by enhancing the effects of a neurotransmitter called GABA in the brain, which helps to reduce anxiety and promote relaxation.