How long can an asthma attack last?

Varies. An "attack" can last from a few hours to days, depending on how well and how soon it is treated. Inflammation and bronchoconstriction (narrowing of the airways) need to be addressed in an exacerbation - the former with systemic steroids and the latter with bronchodilators (ex. Albuterol). Often, bronchodilators may be enough.
Alternatives. Some patients have asthma that will respond well to drugs called leukotriene receptor blockers ("singulair") or enzyme inhibitors ("zyflo"). Other patients may require a combination of an inhaled steroid and a long acting form of albuterol ("dulera", "advair" or "symbicort"). These medications are typically given only to poor responders to single agent inhaled steroids.
Indefinitely. Many cases of asthma involve ongoing inflamation of the airways. In these situations, the asthma attack may continue until the inflamation is controlled. Inhaled steroids are the first line of treatment for those who need to use albuterol to reverse asthma symptoms more than twice per week. Unfortunately, scientific studies have suggested that not all asthma patients may respond well to steroids.