The repetitive and rhythmic mannerisms and activities common in autism and some other neurological conditions. Rocking, hand-flapping, etc.
These movements came to be referred to as self-stimulatory because people thought they existed to regulate sensory input or to create pleasant sensations, and were purely voluntary. While this is sometimes true, it leads stims to be confused with stereotyped movements. Stereotyped movements are not voluntary, although they may be suppressible. Nobody knows precisely why either kind of movement happens, and there is much overlap between the two. This kind of movement can also occur in blind or deaf people. When a blind person stims, it might be referred to as a blindism.
Some autistic people, particularly the ones who have so much difficulty controlling their movements that they have trouble engaging in other tasks, have become angered by the implication that they do these things on purpose because they like it. Thus, they will not use the word stim or self-stimulatory behavior to describe such movements. Others will refer to some movements as stims and others as stereotypies depending on the apparent cause and purpose of the movement. Others will refer to any such movement as stimming.
Most autistic people, regardless of whether they like or control these movements, will have problems if they suppress them too long. They may become emotionally or physically tense, and be more prone to sensory or information overload. They may also experience a rebound effect where their bodies rebel and start stimming more violently than they ever did before. One result reported by autistic people and parents alike is an increase in self-injury when stims are forbidden.
Because of this, more people are beginning to disagree with the specific kind of behavior modification programs that teach people that stimming is wrong or even shameful, something to be abolished at all costs. It is more useful for people to learn to suppress stims when they get in the way of performing a task, and have ample time to stim when it will not get in the way.
For instance, while noding, my fingers are engaged in the activity and obediently refraining from stimming. However, when I release my hands from my conscious control, as happens when I pause to think up the next paragraph, they start flapping and finger-flicking. If I don't let them do this from time to time, it becomes painful and they eventually explode in a flapping frenzy.
A common misconception is that these movements are the result of anxiety. This is probably because neurotypical people mainly stim when they're nervous or impatient about something -- tapping their feet, hand-wringing, and so forth. While some autistic people may stim more when they are anxious, others will do it more when they're relaxed. Some people do it as an expression of extreme happiness or other strong emotions, and hand-flapping is an acceptable less overloading replacement for clapping as a form of applause when an autistic person finishes a speech or presentation. Even autistic people who stim more when they are anxious will usually also stim when they are not anxious.
The often-playful use of a very narrow obsessive interest, especially in an autistic person.
A person can be said to be stimming on mathematics if he sits around gleefully taking the square root of everything in sight. There is a specific quality that distinguishes stimming from other perseverations, in this regard, and it is difficult to describe. Although this is a generalization, stimming is more focused, more active (even if all the activity is inside the person's head), has a certain rhythm to it, and is more playful.
Someone who spends all day and all night nodesurfing may be perseverating, but is probably not stimming. Someone who purposefully and repetitively clicks on the same two softlinks, watches the screens change, and derives satisfaction or even glee out of it is probably stimming and may also be perseverating. There is not always a clear line between the two.