In a camera, flash synchronization is defined as synchronizing the firing of a photographic flash with the opening of the shutter admitting light to photographic film or electronic image sensor. It is often shortened to flash sync or flash synch.
In cameras with mechanical (clockwork) shutters synchronization is supported by an electrical contact within the shutter mechanism, which closes the circuit at the appropriate instant in the shutter opening process. In electronic digital cameras the mechanism is usually a programmable electronic timing circuit, which may take input from a mechanical shutter contact in some cameras. The flash is connected electrically to the camera either by a cable with a standardised coaxial PC (for Prontor/Compur) 3.5 mm (1/8") connector (as defined in ISO 519), or via contacts in an accessory mount (hot shoe) bracket.
Faster shutter speeds are often better when there is significant ambient illumination and flash is used to flash-fill subjects that are backlit without motion blur, or to increase depth of field by using a small aperture.
M, F, FP, X and HSS sync 
X-sync is the simplest to explain and implement: the flash is fired at the instant the shutter is fully open. Electronic flash equipment produces a very short flash
Cameras designed for use with flash bulbs generally had one or more of M (medium) sync, F (fast) sync, or FP (flat peak) sync, designed for use with corresponding bulb types. These sync modes close the contacts a few milliseconds before the shutter is open, to give the flashbulb time to reach peak brightness before exposing the film. Class M bulbs reach their peak illumination at around 20-25 milliseconds after ignition, and class F lamps reach their peak at approximately 5 milliseconds. Most standard flash bulbs used M sync. X sync closes the flash contact just as the shutter blades are almost completely open, and M sync closes the flash contact 20 milliseconds before the blades are completely open.
FP sync was used with FP (flat-peak) flash bulbs designed specifically for use with focal-plane shutters. In these shutters, although each part of the film is exposed for the rated exposure time, the film is exposed by a slit which moves across the film in a time (the "X-sync speed") of the order of 1/100"; although the exposure of each part of the film may be 1/2000", the last part of the film is exposed later by the X-sync time than the first part, and a brief flash will illuminate only a strip of film. FP bulbs burned close to full brightness for the full X-sync time, exposing the whole frame even at high shutter speeds.
X (xenon) sync is a mode designed for use with electronic flash. In this mode, the timing of the contacts coincides exactly with the full opening of the shutter, since xenon flashes respond almost instantly.
Due to their construction, focal plane shutters, as used on most SLRs, only allow normal xenon flash units to be used at shutter speeds slow enough that the entire shutter is open at once, typically at shutter speeds of 1/60 or slower, although some modern cameras may have an X-sync speed as high as 1/500 (e.g. Nikon's D40 DSLRs). Special electronic flash units for focal-plane shutters fire several times as the slit moves across the film. Electronic shutters used in some digital cameras do not have this limitation and may allow a very high X-sync speed.
Leaf shutters, which are generally situated within the lens housing, open to expose the entire image at once, and therefore allow flash sync across all shutter speeds (up to 1/1600" with a Schneider Kreuznach lens on a Phase One/Mamiya 645DF camera).
Higher sync speeds are useful as they enable the brightness of the background to be controlled while maintaining normal flash exposure in the foreground, for example with a back-lit subject.
Today, certain modern xenon flash units have the ability to produce a longer-duration flash to permit flash synchronization at shorter shutter speeds, therefore called high-speed sync (HSS). Instead of delivering one burst of light, the units deliver several smaller bursts over a time interval as short as 1/125 of a second. This allows light to be delivered to the entire area of the film or image sensor even though the shutter is never fully open at any moment, similar to FP sync. The downside is that the flash is of less effective intensity since the individual bursts are lower powered than the normal capability of the flash unit. Only certain camera and flash combinations support this feature, and the camera-flash pairings are almost exclusively from the same manufacturer, the first being the Olympus OM-4 with the F280 flashgun. Wireless remote flash triggers with these features are becoming more common.
Rear-curtain sync 
Some modern electronic cameras include the ability to fire the flash just before the closing of the shutter, so that moving objects will show a streak where they came from and a sharp image where they were at the end of the exposure, useful for moving objects to convey a sense of speed. This mode is called either rear-curtain sync or 2nd-curtain sync.
The first camera to implement a flash synchronizer was the Exakta, in 1935.
Wireless sync 
Some synchronization methods employ optical or radio triggering that requires no electrical connection to the camera or main flash unit. This allows the camera to move without the restriction of cables. Optical triggering requires at least one flash electrically connected to the camera. A sensor, either built-in or external to a remote slave flash unit, will sense the light from the master flash and cause a remote flash to fire. Radio triggering requires a transmitter electrically connected to the camera to trigger a remote receiver connected to (or embedded into) a remote flash unit.
One of the problems with optical triggering is that in modern digital cameras a built-in or shoemount flash releases one or more 'pre-flashes'. Many optical slave units will respond to the pre-flash, thus firing the slave flash too early. Sometimes this can be prevented by setting the camera to manual ('M'). However, a good number of cameras will still fire pre-flashes even on a manual setting. This is equally true for compact cameras as well as the more professional digital SLR cameras. Still, a flash connected to the PC jack on a camera or in the hotshoe will usually not fire pre-flashes in the 'M' setting and therefore can be used to optically trigger a number of slave flashes.
Many compact cameras, however, only have a built-in flash and no hotshoe and no connector for an external flash and there is no way to suppress the pre-flash. In those instances, slave units are used that are able to skip a number of flashes, thus skipping one or more pre-flashes and only firing simultaneously with the main flash firing. Some modern flash units have this capacity built in. An example at the low end is the Godox 18, a simple flash unit that can be set to skip a max of 3 flashes. A more advanced flash that can set to skip one pre-flash is the popular 'strobist' flash, the Lumopro160. Also, some studio flashes can be set to ignore pre-flash.
Rather than selecting a specific number of pre-flashes to ignore, some slave units have a learning mode in which firing one flash teaches them on which flash to synchronise.
Several camera equipment manufacturers have support for remote flash triggering built into at least some of their camera and flash models. This eliminates the issue of slave flashes triggering upon seeing a pre-flash, as the master flash unit (whether a shoemount flash or the camera's pop-up flash) sends predefined signals to the slave units to control them. However, the user is restricted to using flash units from that camera manufacturer, or a limited selection of third-party units which are compatible with it.
See also 
- Norman Axford et al. (2000). Manual of Photography: Photographic and Digital Imaging. Focal Press. ISBN 0-240-51574-9.
- ISO 519:1974, ISO 519:1992 (1992-11-25). Photography -- Hand-held cameras -- Flash-connector dimensions. Geneva: International Organization for Standardization.
- Confused about flash bulbs Graflex.org
- Simon Stafford, Rudi Hillebrand, Hans-Joachim Hauschild (2004). The New Nikon Compendium: Cameras, Lenses & Accessories Since 1917. Lark Books. ISBN 1-57990-592-7.
- Mike Stensvold (2002). The Complete Idiot's Guide to Photography Like a Pro. Alpha Books. ISBN 0-02-864387-9.