The Bitey Mouthy Puppy
Puppies are like human infants; they explore the world with their mouths. Everything is fair game, so it's up to you to help them learn what they can and cannot chew on. When they choose people, you don't just want to teach them not to put their mouths on you, you want to teach them bite inhibition so if they are startled into swinging around with an open mouth when they are adults the mouth that hits you stays soft and doesn't bite down.
Aggressively bitey puppies are telling you something. They may be hungry if they aren't being fed often enough or if the food they are getting isn't meeting their nutritional needs. Foods with corn, wheat and soy, or any other grains in the top 5 ingredients won't meet your puppy's needs. Free feeding also isn't good since kibble goes stale when left out exposed to the air. Another biting cause is over stimulation. Puppies need to sleep or rest up to 20 hours a day. If your puppy isn't getting this he will be cranky and touchy. If you're petting your puppy and she gets bitey -- hands off the puppy! Back away and give her space. If she wants to play with you, she'll come to you and play should be calm and structured.
Let's say you're on the floor playing with your puppy. You're holding a toy and she goes from biting at the toy to biting at your hands. Ouch. Puppy teeth are sharp! If she is 8 weeks or younger you can make a squealing sound (like another puppy would do) to let her know that hurt. If she's older the squeal can arouse her more so say a firm "ouch!" and let her move away from you. If she backs off, great. Go back to playing with the toy with her, waiting fir her to sit when you offer the toy so she's saying "please".. If she goes for your hands again, hand her the toy and remove your hands. You'll do the same thing if she gets more excited. You can still sit there (for now), but she loses your hands playing with her. If she climbs on you to go for your hands again, stand up, cross your arms over your chest to get them out of reach, and don't look at her. (It's often better to cross your arms over your chest rather than just raising your hands so they don't appear as a tantalizing target.) If she puts her mouth on your but does not bite down -- those sharp little teeth aren't hurting you -- just extricate yourself as you replace your hand or arm with a toy. You don't need to correct her, just show her what her mouth should be on.
If she regularly hard bites you can teach her to have a gentle mouth by making a bite stick. Get some PVC pipe and some caps for the ends. Drill holes in the PVC big enough for her to get a good whiff of the eat stick you will put inside. Then offer it to her. If she puts a gentle mouth on it she gets a "yes" and a treat. If she grabs it hard she won't be able to get the food out and the PVC will be too hard for her to chew on. Don't play tug with her with the bite stick. When she's gentle, say "yes" and give her a treat.
If she's still excited and resumes trying to attack your feet or pants, say "too bad!" in a cheerful voice and take her to time out. Time out can be a crate (if her crate is a safe and happy place), a bathroom, laundry room, or large closet with a clear floor and the light on. She should be given something to help her relax, like a frozen stuffed Kong or a Himalyan Yak Milk chew so she can calm down. She stays in time out for 5 quiet minutes if she's young, 10 minutes if she's a year a more. When her time is up, let her out with no fanfare and let her go about her business. The goal here is for her to reset so she can rejoin the family when she's calm.