Xanax, also known by its generic name alprazolam, is a medication commonly prescribed to treat anxiety and panic disorders. It belongs to a class of drugs called benzodiazepines, which work by enhancing the effects of a neurotransmitter in the brain called GABA. This, in turn, helps to calm the central nervous system and reduce feelings of anxiety and stress.