Asthma inhalers deliver the drugs directly to the airways. Some are used to treat asthma attacks while other are used to prevent them. They work by preventing or relieving bronchospasms (spasms of the airways) and bronchoconstriction (narrowing of the airways).