Q-switching is a technique used to produce short, high-intensity laser pulses from an otherwise continuous-wave laser. It works by modulating the cavity losses of the laser, allowing the population inversion to build up past threshold before being rapidly dumped out as a pulse. There are two main types of Q-switching - active Q-switching which uses an external device like an electro-optic shutter to modulate losses, and passive Q-switching which uses a saturable absorber whose losses decrease with increasing intensity. Common Q-switching methods include electro-optic, acousto-optic, mechanical shutters, and saturable absorbers.