Stereotyped rhythmic rocking or rubbing crossed legs together, usually girls. Self-soothing, self-stimulating behaviour.
Nothing to worry about – but no one likes to talk about it and parents can feel mortified. Distraction is all that is needed. As they get older it is likely to go away by itself – but otherwise teach that it is a private thing! Avoid shame.