How exactly do anxiety meds work?

Different methods. Different meds work differently - some affect serotonin levels by raising them, while others are just sedatives (these are the most addictive like Xanax (alprazolam) and ativan).