A nice way to do this is to focus first on your breathing and your steps. See how many steps you naturally take on the in breath and how many you take on the outbreath. Perhaps you take two steps on the inbreath and two on the outbreath. Or two on the inbreath and three on your outbreath. Always breathe in accord with your body's needs, which change in accord with the terrain and other factors.
Then give your mind something else to do rather than drifting away into your worries. You can do this by saying the word in silently to yourself on the inbreath, and out silently to yourself on the outbreath. Walk so that you enjoy your steps and your breathing.
After a while, you can change the words from in and out to something else. For example, letting go, and then letting be. Or try simply yes on your inbreath and thank you on your outbreath. Have fun, and make up some words that work for you.
When you are stressed or upset, or just because it seems like a nice thing to do, try practicing walking meditation for a half hour or an hour. After practicing walking meditation, you can feel much calmer, more concentrated, happy and peaceful.