Most puppy biting is a way to explore the world around them and learn social cues, or to seek attention. Like dogs of any age, puppies may also bite due to pain or extreme fear.
Controlled nipping is a normal part of canine communication and play, but puppies are not born knowing how to do it appropriately. Instead, they bite too often and too hard at first. Their mothers and litter mates start teaching them not to bite by yelping or moving away when they get too rough, but it sometimes takes awhile for puppies to learn. They then try the same behavior when they play with humans.
Some humans accidentally teach puppies to bite for attention by reacting every time the puppy nips them. A bored puppy does not always distinguish between positive and negative attention, so even if the owners respond by yelling, the behavior may be reinforced.
Some puppy biting may also be from teething pain. This is the cause of most puppy chewing, and some puppies try to chew on their owners or other dogs if a toy is not available.
Since dogs use biting as a means to defend themselves, a puppy who is cornered and afraid or hurt may bite in an attempt to protect itself.