This video explains how asthma inhalers work:
Just as a summary really quick I go through it here.
The main problem with asthma is a narrow airway, that is preventing decent airflow and preventing proper air removal from the lungs. This occurs via two way, 1) the airways are narrowing (called bronchoconstriction) and 2) the airway are getting inflammed and thicker. Both together, decrease the space needed for proper airflow.
So, out inhalers therefore have two goals, bronchodilation, or opening up the airways, and decreasing the inflammation. If both are these are fixed, and airways unnarrows and more air passes through.
The B2 receptor (Beta 2) is part of the nervous system which tells the airways to dilate. We want to activate these receptors, and we do this with a B2 agonist medication, most famously Albuterol. This medication is quick on and quick off, therefore is usually used as needed.
We can also activate it with a longer acting B agonist, but these are usually done in combination with a inhaled steroid.
Inhaled steroids decrease airway inflammation. So it makes sense to combine them with long acting B agonists. These medications take time to work, and therefore require daily use, and can't be used as needed.