Xanax is a medication that is used to treat anxiety and panic disorders. It is a benzodiazepine, which is a class of medications that act on the brain and central nervous system to produce a calming effect. Xanax can be used to treat symptoms of anxiety, such as excessive worry, restlessness, difficulty concentrating, and irritability.