Xanax contains alprazolam, a medication belonging to the benzodiazepine class. It works by enhancing the activity of GABA, a neurotransmitter that reduces excessive nervous-system activity.