These days almost all the modern SLR digital cameras got a setting where one can choose between front curtain flash and rear curtain flash. It is just a pity that such a few people know what this stands for. Okay in short this is what it is suppose to be.
Say your shutter on your camera is set on 1/125sec. If you are using flash the speed that the flash flashes is normally somewhere between a 1/30000 sec and a 1/40000 sec. That mean that the flash only flashes during a very short time during the exposure of 1/125 sec. Now you can choose if you want the flash to flash in the beginning of the shutter opening or at the end.
If you using a long shutter opening like the photo below (1/8 sec.) and you set the flash to flash at the end of the shutter opening you going to get some blur or movement in your photo and the flash will freeze the movement at the end. In this case the blur will behind the part that have been freezed by the flash.
If the flash flashes in the beginning it will freeze the movement and then you will have some blur in front of the freezed part which will look unnormal.
One can get really nice effects with sport photography but can use it with anything. Play around with the shutter speed till you find what is working for the specific subject you are shooting.
I shoot the photo below on 5 December 2008 at a wedding with the flash setting on rear curtain flash and the shutter speed was set on 1/8 sec. If you look at the hands of the guy you will notice that the blur is behind his hand. If the flash setting was on normal or front curtain the blur would have been in the front.