This is achieved by a high-voltage (20 kV typically) electric discharge between two electrodes over the surface of a quartz (or glass) tube.
A sub-microsecond flash is fast enough to photographically capture a supersonic bullet in flight without noticeable motion blur.
The person credited with popularising the flash is Harold Eugene Edgerton, though the earlier scientist Ernst Mach also used a spark gap as a fast photographic lighting system.
William Henry Fox Talbot is said to have created the first spark-based flash photo, using a Leyden jar, the original form of the capacitor.
However, since a large capacitance would have a relatively long discharge time that would make the flash slow, the only practical solution is to use a very high voltage on a relatively small capacitor, with a very low inductance.
Typical values are 0.05 µF capacitance, 0.02 µH inductance, 10 J energy, 0.5 µs duration and about 20 MW power.
The spark is guided over a quartz surface to improve the light output and benefit from the cooling capacity, making the flash faster.