The reflex, protective, spasmodic closing of the vocal chords - partially, or fully. Most dangerous when the patient is semi-conscious, because the protective airway reflexes are heightened, and the reflexes to re-open the vocal chords are minimal. The patient is semi-conscious during Stage II of anaesthesia - either induction or emergence.
Caused (during light anaesthesia) by:

Partial laryngospasm: Complete laryngospasm:
Symptoms of airway obstruction:
The resultant hypoxia (low oxygen) and hypercapnia (high CO2) produces an increased respiratory effort, with noisier breathing.

Violent coughing or breath holding indicates airway obstruction, which requires suction. At induction: laryngospasm breaks up with deeper anaesthesia. A forceful cough may dislodge foreign material.
Terminating the laryngospasm:

Take patient out of Stage II of anaesthesia:
Breaking the laryngospasm:
Alternatively, apply pressure to the laryngospasm notch!
Avoiding laryngospasm: