The force responsible for allowing us to walk is static friction, but the way it plays a role can be somewhat unintuitive. I want to make it clear I am not an expert in biomechanics, physiology, or sports science. My discussion will be a highly simplified overview of what role friction plays in walking.
First, let's suppose we were trying to walk on a flat surface with a ludicrously small coefficient of friction (static and kinetic). Maybe it's slippery ice with a layer of water or oil.
For the sake of the discussion, we approximate the friction forces as zero $\vec{f}\approx 0$. But if this is the case, then there are no external horizontal forces acting on you, which means your center of mass must not have any horizontal acceleration. If you start with zero velocity, your center of mass will remain at the same location!
So what happens when you try to walk on such a surface? Imagine one foot in front, one foot at the back. When you lift your back foot and move to forward, a portion of your mass (the leg part) moves forward. But because your center of mass remains at the same location, the rest of your body (including your front leg) must move backwards. In the end, you only change positions of your legs without changing your location whatsoever.
Another way to think about it is through Newton's third law. Absent of external forces, if you try to pull one part of your body in one direction, the rest of your body will be pulled in the opposite direction. Hence, you "won't be able to win," so to speak, and achieve overall translational displacement.
Now contrast this to the case where friction holds your front foot in place as you move forward (so the coefficient of static friction is sufficiently large). As you can intuit from your everyday life experience, the static friction will keep your front foot in place. Somehow this is responsible for your overall motion forward.
Now there are a few interesting things to note:
- The only external force present is the friction force, so it is the only possible force responsible for moving your center of mass forward. But if it moves your center of mass forward, it has to point forward itself. So the static friction force applied onto your grounded foot points forward.
- The force responsible for overall translational motion is static friction, which by itself involves no motion at the point of contact between the relevant surfaces. Somehow a force that opposes motion is the cause of overall movement.
These certainly seem paradoxical.
To understand things more clearly, we can take a closer look and take a few things apart. Let us zoom in on my drawing containing the "stick figure with brick shoes." I will depict horizontal forces only.
When one foot is on the ground and you are in your swing phase, your body is applying a force onto your grounded foot pulling it backwards. By Newton's third law there is a reaction force from your foot onto your body pulling the body forwards.
In the absence of friction, your foot and body will just switch which one is in front without any change in your center of mass. However, because there is static friction onto your grounded foot canceling out the force your body is applying, the grounded foot stays in place while your body is able to "swing" itself forward. Once your body gets in front of your grounded foot, you managed to make one complete step.
Related questions (some answers there might be relevant as well):