A self-loop is a state transition whose start and end are the same state. It means "on this input, stay here".
Self-loops are easy to forget, because nothing visibly happens. But the machine still has to do something on every input, and a complete state diagram needs one arrow for each. Leaving the loop out makes the diagram incomplete: nobody can tell from the drawing what the circuit does.
They show up all the time:
- a counter with count enable = 0 holds, so every state has a self-loop on E = 0;
- a sequence detector for 110 stays in "seen 11" on another 1, because 111 still ends in 11;
- a machine waiting for a button press loops in its idle state until the press arrives.
When tracing, a self-loop still counts as a step: the clock ticked, one input was used, the state just didn't change. In a mealy machine a self-loop can even produce an output of 1.