There's a lot of misinformation and misunderstanding surrounding this feature. But it is really simple.
Youtube shutter
You need to firstly understand how flash sync works. The reason your flash has a max sync speed is that as your first shutter curtain travels down the frame to reveal the sensor to the light, the second curtain follows to cover the sensor (or film) back up. At faster shutter speeds, the sensor is actually exposed by a slit between the curtains. At sync speed and slower, the whole of the sensor is seeing the image - it's at this point the flash fires to illuminate the image.
Between x sync speed and 1/30 sec, there's no real difference between 1st and 2nd curtain sync, because the shutter isn't really open long enough to register enough of a difference.
Below 1/30 second though, using 2nd curtain sync the flash fires just before the 2nd curtain comes down. So a linear moving subject would have a flash lit image with a faint tail illuminated by the ambient.
What it doesn't do (and is often suggested) is 'stamp' the flash image over the ambient image, in fact unless you're after that specific effect, 2nd curtain sync is a bit pointless.
I use long shutter speeds with flash quite a lot, but because my subjects don't have a linear movement I use 1st curtain sync. I do this so that I can still choose the timing of my shot (how random is it pressing the shutter knowing your final image will happen half a second later)
edit to add - most of this has appeared above - I was busy