Our dog gets it if he paddles in the sea when it is too cold. The first time I wasn't sure what was wrong, his tail was droopy and he seemed uncomfortable, and I really panicked thinking it was broken. The vet was very reassuring, and prescribed some painkillers, however it all cleared up within a few days. Luckily we didn't use all of the pain relief medication, so when it happened a second time we we well prepared!
It's basically a sprain of the tail muscles, a bit like we would get if we exercised without warming up first - at least that's how it was explained to me! Uncomfortable for the dog, but clears up within a few days.