The number of limbs of a creature is determined by rotational inertia around the 'feet' of the creature relative to its mass. This ratio determines how easy it is to fall over. The mass of a creature is by approximation proportional to its size cubed $$m \propto l^3$$ while its rotational inertia is proportional to its mass times its size squared, $$I \propto ml^2 \rightarrow I\propto l^5$$
For very small creatures, it is extremely easy to fall over. This is why insects have six legs, so that three legs may be in contact with the ground at all times creating a stable tripod. Larger animals can do with just four legs, because they take longer to fall over on two legs (long enough to move a second pair of legs to a suitable location). Humans place their center off mass high from the ground and can create a large moment of inertia by standing up high and moving their long arms around, which allows them to be bipedal.
This gives us a general idea about a tripedal animal. It will be quite tall and its center of mass will be high from the ground, to prevent toppling when only two legs touch the ground. The general 'tripod' image we know from War of the Worlds is thus a logical option: the center of mass high up, and three fairly long legs.
The real question before we can answer how the animal would walk, is why it has evolved to have just three legs* and not two or four. Apparently, two legs gives insufficient stability, and four legs requires too many resources. The good thing here is that you want your creature to move long distances, which definitely favours fewer limbs. The reason for three legs over two could very well be due to the terrain. Perhaps your world is covered in a thick layer of soft material with steadier ground underneath; perhaps igneous rock covered by a thin layer of peat bogs or marsh-like soil. With two legs, it's difficult to free yourself from marshlands, because if you pull out one leg, you push in the other. Three legs form a great solution, as you distribute the force of pulling out of the marshes over two other legs.
This leaves the question of locomotion. We lost the fourth leg for energy considerations. A third leg swinging in the middle underneath the body requires a lot of energy due to the awkward poses required, and does not seem ideal. Instead, let's try something where we go in a fluent motion.
The animal will have one front leg (slightly thinner and more agile; perhaps a displaced tail) and two side legs (stronger and heavier). The front leg initially starts pointing left forwards; the left leg pointing left rearwards, and the right leg pointing straight to the right, in a stable equilateral triangle. It starts by placing its left leg forwards next to the front leg, while the body moves forward. All the legs will now be in one line, and slowly falling forwards due to the momentum from the left leg. To counter this, the front leg swings to the front right now. We now have an equilateral triangle exactly mirrored, and repeat the process. At all times, the body will be directly in line with the legs or in the middle of a stable equilateral triangle, which is exactly the stability you want when trying to pull yourself free from bogs. Furthermore, the body makes a continuous forwards motion, and thus it can be very energy-efficient. This way, it can cover large distances over the difficult boggy terrain without ever getting stuck, unlike its predators.
To escape from predators when on dry land, it can adapt the 'jumpy' locomotion with the front leg going underneath the body for support while the side legs can propel the creature forwards. It will run towards the nearest bog where the predator dares not go.
* I'm well aware that evolution doesn't need a 'why' and doesn't work towards a goal. However, for worldbuilding I think it helps to think of evolution like that - the fact that it happened is just a coincidence, just like our protagonist survives it to the end and is not one of the side character that gets killed in the first minutes of a story.