Teaching bite inhibition to puppies
Note that these are ONLY suggestions, and they are geared for PUPPIES...not older problem dogs or rescues. Teaching bite inhibition at the proper time in the dog's life--early puppyhood--is far easier than trying to reprogram a dog who never learned it as a pup. Some of these things--the non-confrontational ones--may work well on older dogs as well...but with older animals, ALWAYS avoid putting yourself in a situation where you are likely to be bitten.
I don't claim vast authority in such matters; this list of ideas is from my experience & the experiences of friends only. They are presented in order of increasing intensity, and it is recommended that you stay on one method consistently for a while (a week or two) before moving on to the next step.

1) If the puppy playfully nips you, YELP loudly and withdraw your arm (or whatever he just bit). Refrain from play for a few seconds. Do this CONSISTENTLY every time the pup nips you...the message is, "If you're going to play rough, I don't want to play with you!"
(Note: With most dogs, the siblings tech "no bite" by this method before the puppy ever comes home to live with you. However, in animals pulled at a younger age, this lesson must be taught by the human family.)

2) If the pup keeps coming back at you as soon as you lower your arm again (some puppies think this is a game: human yipes, pull aways, lowers arm, is ready to be bitten again)...then yipe loudly and walk out of the room, or remove the pup to his crate. The key here is to get the message across...that if the pup is to interact with humans, there will be NO biting, or the interaction stops immediately. Timing is everything, BTW...you need to YIPE as soon as those sharp li'l teeth touch you.

3) Say "no bite" in a low, growly voice and hand him something acceptable to chew on. When he takes it, praise him generously in a cheery, high pitched voice.

4) Growl "no bite" and gently grab his muzzle. Hold shut for a second.

5) Growl "no bite",  hold top of muzzle & squeeze firmly (not enough to hurt!) Release and hand him an acceptable toy or chewy. Depending on age of pup & how long the biting has been going on, you may want to start snarling at pup rather than just growling "no".

6) Growl "no bite" (in fact, do this from here out so I can stop typing it! ;) and tap top of muzzle with two fingers. Walk away.

7) Grab tongue or press on back of tongue. This triggers their gag reflex and will likely cause them to spit your <body part> out.

8) Using your hand, press on pup's shoulder to "pin" him down. Hold him there, glaring angrily for a second or two, then release & walk away. (Equivalent to a mama dog's stepping on pups to hold them down.)

9) Scruff shake--hold side of face & shake once, firmly but gently. Growl or snarl "NO BITE" while looking pup dead in the eye.

~Less recommended (but still commonly done) steps for more difficult animals:

10) Tuck lips into corner of mouth, so that pup is biting himself. The intention here is for him to make the connection that when he bites, it hurts! On some pups this may backfire, and they may bite still harder out of anger and retaliation. It's not common...but if your pup does this, you probably have a hard tempered animal who will require a firm hand and a strong alpha attitude from you. Odds are, he will test you often, so be on the lookout for his challenges.

11) Bite pup on the nose or top of muzzle, while growling (similar to the muzzle grab--and the muzzle is THE place for corrections amongst canines--but more "authentic". Hence the reason for so many dog bites being to the face. Watch your
own face if you do this, some pups will bite  your face instead if given the opportunity!)

12) Alpha roll (this is controversial and must be done properly...it can cause more problems than it solves if done under the wrong circumstances)

13) Lift up by the scruff and roar "NO bite!" then walk away or send dog outside or to its crate.

With any luck at all, even the most difficult pups should never need to get past Step 9. (Again, make sure you spend enough time at each level, before moving onto the next!)  Truthfully, the best thing to do with an older pup or adult who is still biting, would be to check into a good professional trainer...if you haven't already  ;)