The tubes (bronchioles) to the lungs can become narrowed by either a muscular spasm or an irritation of their lining producing inflammation, a thick mucous, both will mean there is less space in these tubes for the air to travel down causing the characteristic 'wheeze' of asthma. The definition of asthma is that this is reversible, unfortunately not completely in everyone.
'Attacks' can be caused by a number of stimuli, small particles, (dust, pollen, smoke) exercise, stress, excessive laughter, crying or screaming.
If an attack occurs ask the individual if they have any medication on them, be aware they may not have the breath to answer, so hand signals work. Sometimes moving to a different location that is calm, clean, quiet, shaded and ventilated, may help, if it doesn't seek medical advice.