Typical infants and toddlers may kick their legs repeatedly, rock back and forth while playing or flap their hands in excitement. These movements are increasingly thought to be important for helping children understand how their bodies work and to develop coordinated voluntary movements.
These early repetitive movements may be more intense in autistic people and persist well beyond childhood.
…
A subset of repetitive movements such as twirling, hand-flapping or vocalizations are sometimes called ‘stimming.’ This is short for self-stimulatory behavior, a clinical term that some autistic people have adopted. They have also spoken out about the importance of their ‘stims.’
…
Over the past several years, however, autistic people have described a wide variety of functions that their repetitive behaviors serve.
Sometimes, they say, engaging in these behaviors just feels good. But beyond that, repetitive behaviors may offer these individuals a way to calm their anxiety, generate or maintain awareness of their bodies, focus their concentration or deal with overwhelming sensations or emotions. They may also help autistic people communicate their mental or emotional state to others.
The same behavior may serve different purposes in different people, or even in the same person at different times, depending on the situation or mood.