zone pretty much explained it but i'll try saying it too..
You can only really dash dance during the initial part of the dash animation. If you try to turn around after the initial animation, you will turn around slowly. Some characters have short initial dash animations, so you will have to start running in the other direction sooner to avoid getting stuck in that slow turn-around animation (Example: Sheik).
Normally you do not want to just slam the control stick back and forth. Doing the dash dance quickly does not have a whole lot of uses because you're pretty much standing in the same spot. So like Zone said, you want to run as far as you can to one direction before the initial dash animation ends and then turn around and repeat. You should, however, mix things up and shorten your dash movements depending on the situation to throw your opponent off or capitalize on a open moment etc.
If you end up dashing beyond the initial dash animation, you can wavedash in whichever direction and you'll be immediately able to dash/ dash dance again.
You can also hold down to cancel your dash then start dash dancing from there. Btw, canceling your dash by holding down only works after the initial dash animation.
Here's an example of using the dash-dancing in a game (I believe it's an example of spot-dodging, but i've never really heard that term before):
You are Marth and your opponent is Falco. You begin to dash dance back and forth with long strides. Falco full-jumps and it seems he is going to fast-fall and come down with a dair (ada). You (Marth) run up to falco, being in range for his attack. You then run away as Falco comes down with the dair and run back and grab him as he lands. Falco misses the attack and you now can begin to chain throw etc.
Hope this helps.