When you are shooting in a low light condition, basically you have two options. One is to use a slower shutter speed and the other one is to use an external flash unit as a light source. When you use slower shutter speed, you will be able to collect enough ambient light from the image to get the proper exposure. This technique works very well when you are shooting non-moving subjects such as a statue, trees, buildings, landscape etc. But there is a chance of getting blurry image when you are shooting moving subjects with long exposure. On the other hand, when you use en external flash unit and let your camera choose an appropriate settings automatically, camera normally sets faster shutter speed because it detects there is a presence of external flash unit to compensate the exposure. Now, when you shoot with that settings, you will get well exposed subject but you will also get the dark background because your camera sensor didn't get enough time to collect the ambient light from the environment.
It's common that the ambient light will be much warmer than the electronic flash lights . If you want the two sources to match, you may want to use a warming filter on the flash. That can be done with a gel if you are using an external flash unit like the SB-600, SB-700, SB-800 or SB-900.
This is the situation where slow sync flash comes handy. It combines both techniques discussed above and gives better result with nice effects. Slow sync flash is the perfect choice for low light photography. This technique is supported by most of the DSLRs which tells your camera to shoot with both slower shutter speed (longer shutter opening time) as well as firing the flash. What it does is, fire the flash briefly to light the foreground subject and capture the ambient light to reveal more details in the background. With this technique, you will get the properly exposed subject and be able to collect the ambient light from the environment to get well exposed background scene. If you have noticed "night mode" or "night portrait mode" available in your camera, they use same technique but will give less control to the photographer. If you need more control over the shutter speed or flash power, you have to use a Manual Mode (M).
When we talk about slow sync flash, there are couple of slow sync flash techniques we have to mention about. And they are - front curtain sync flash (also known as first curtain sync flash) and rear curtain sync flash (also known as second curtain sync flash). Both front curtain flash and rear curtain flash techniques can be used for moving subjects when there is a mix of ambient light and flash to get the motion blur effect.
1. Front Curtain Sync Flash
The standard slow sync mode is the front curtain sync mode. This mode tells your camera to fire the flash at the beginning of the exposure and then keeps the shutter open for the ambient light exposure. That means when you press the shutter release button, the flash fire immediately freezing the motion and then shutter will remain open afterward (for the duration of the shutter speed) capturing the ambient light.
2. Rear Curtain Sync Flash
This mode tells your camera to fire the flash at the end of the exposure. That means when you press the shutter release button, camera opens up the shutter and starts collecting the ambient light and just before closing the shutter, the flash will be fired to light up and freeze your main subject.
Image Credit : Todd Klassy
Rear Curtain Sync Example : When card was moving from top left corner to bottom right corner, rear curtain sync flash gave nice trailing effects of traveling path while giving a clear and frozen shot at the end.
Both techniques look same but they both have different effects when properly used. Usually, you will find sports photographers using rear curtain sync flash to freeze the player and getting nice motion blur effect behind the player.
Lets take another slow sync flash photography example of "car moving on the road".
Front curtain Flash : When you press the shutter release button, shutter opens up and flash will be fired immediately. Then car continues to move, so there is a less light motion blur in front of the car.
Rear Curtain Flash : When you press the shutter release button, shutter opens up until it's exposure time and you get a less light motion blur. And at the end of the exposure, flash will be fired (freezing the motion of the car) and then shutter will be closed. In this case, the motion blur is behind the car, as it should be.