In your "fragment", walking is a participle. Think of it this way; while (doing what?) walking, and since this word adds -ing to the end of the verb "walk", it is therefore a participle.
to keep your body balanceyou can still walk with balance when your hands are in your pockets or doing anything else because hand swings don't affect much while walkingbut if you see runners,...
Walking sometimes clears the head, it's liberating too, it's also healthy. If you don't already walk then I recommend that you get some boots on and walk, go and look at the sunset.