Guaifenesin is in a class of medications called expectorants. It works by thinning the mucus in the air passages to make it easier to cough up the mucus and clear the airways.