Xanax is the brand name for a prescription drug called alprazolam, typically used to treat anxiety and panic disorder. It can also treat anxiety disorders caused by depression and panic disorders that involve feelings of helplessness and embarrassment, such as agoraphobia.