Aside from the most obvious answer - avoid dogs - there are some straightforward ways a person can not do all the typical things that tend to lead to a dog bite.
Most people are bitten not by stray/strange dogs, or even mean/aggressive dogs. Most people are bitten by anxious or fearful dogs who feel threatened or cornered by something a person has done. For people who do not have a well developed sense of reading dog body-language, there are some basic tips for not placing one's self in a biting situation.
1) Don't charge up to, or rapidly approach, or pick up, or even directly approach a dog that isn't yours. In fact, the safest way to encounter a new dog is to let the dog approach you and take it's time sniffing around and sizing you up without you appearing to pay attention at all. Be mindful of the dog but be neutral and keep your hands to yourself and don't stare at the dog.
In fact, even when re-entering your own home it is a good idea to not make a big fuss over your own dog - not because you might get bitten but because this sends the wrong message to your dog; you are emphasizing that you've been apart - in other words you're emphasizing that separation is a bad or anxiety producing thing. This can start to develop or reinforce a dog's anxiety over separation by making it a big deal that you were gone and are back. Low key entry and exits go a long way towards keeping emotions from running amok.
2) Similar to 1 - don't make a lot of noise like "Hey DOGGIE DOGGIE, come here doggie, come-here-come-here-come-here!" The last thing a dog that isn't certain of itself or you needs is for you to ramp up their sense of 'something weird is about to happen' by you creating a lot of noise and/or motion. Play it cool. Let the dog approach and don't whistle, call etc. Some dogs just aren't that in to you. Learn to live with that reality.
3) Remember, under the wrong circumstances any dog can bite. Even if they wag a tail and have an owner who assures you, "Oh, he's fine, he growls at everyone."
[This might be true - my own dear Gracie has a tendency to have a special growly-bark she uses when she's happy - but a stranger should never count on being able to tell the difference between her happy growl and her worried growl and if you were in my house I'd encourage you to use your own best judgement even if I were saying, "She loves hugs." People using common sense around strange dogs are less likely to get bitten.]
When one has time to learn about dog body language then one will realize that there are very few dogs who bite without ample warning and provocation. If people remembered to not treat every dog as a friendly dog who wants to be fussed over and grabbed by strangers, then there would be a lot fewer dog bites in the world.