What does 'cut each other off' mean when it is in the context of driving or walking?
To cut someone off is to force your way in front of someone else moving in the same direction, forcing that person to slow down or swerve to avoid you.
To cut each other off is simply the same idiom used reciprocally, indicating that two people are constantly jostling each other trying to get ahead.
Cut off in this phrase is used in the sense of to interrupt or to stop something.
"To cut each other off" in the context of driving is a little odd because usually one person cuts someone else off, meaning that one person's actions interrupt the other person's driving.
For example, as @MonicaCellio said, in the situation where someone turns left across a lane of traffic in a manner that forces the oncoming driver to brake or swerve could be described as "cutting someone off."
So "cutting each other off" while driving would mean that a sequence of cutting off was going on, with Driver A cutting off Driver B, then Driver B cutting off Driver A.
This applies equally to walking, provided that one person's actions interrupt another person's trajectory.
To "cut someone off" in general is to make them have to quickly change course. This can be on the road by swerving in front of them, on the water in a similar fashion, or in a conversation by interrupting or interjecting. A different but related meaning is more literal; a barman can "cut off" a patron who's had too many drinks, refusing to serve them any more, or a father or financial supporter can "cut off" the flow of money to a person who is wasting money or otherwise misbehaving.
If two people are "cutting each other off", it's most likely the first meaning; two people are jockeying for position on the road or in the water by making maneuvers that force the other person to maneuver away to avoid a collision.