Xanax (alprazolam) is a prescription drug used to treat anxiety and panic disorders. It’s a benzodiazepine that works by boosting a brain chemical to reduce anxiety.