If a walking character's main action is the movement of its legs, swinging its arms or bobbing its head along the way is the secondary action. It doesn't interfere with the "walking" information — it just makes the character feel more alive and expressive.
The one rule that matters: never let the secondary action upstage or compete with the main one. Make it too big or too attention-grabbing and the viewer's eye drifts away from what they're actually supposed to be watching — which is why it's usually kept smaller in amplitude and timed a beat behind the main action, tying it to overlap.
A talking character gesturing with their hands, an angry character tapping a foot — both are secondary action. They layer personality on top of the main information (the dialogue, the emotion) without changing it.
When to use
If the secondary action catches the eye before the main one does, dial back its amplitude or delay its timing.