Snapping is the canine equivalent of firing a shot across the bow, a warning that the next step will be more drastic. Dogs usually telegraph their punch clearly, with specific behaviors leading up to this point, including staring, growling and body posturing. But don't bet your safety on it.
A snap is an abrupt movement of a dog's head with a sudden closing of the teeth, causing an audible click. Animal behaviorist Dr. Ian Dunbar's published dog-bite scale describes "obnoxious or aggressive behavior but no skin contact by teeth" as Level 1 bite behavior. The explanation of the levels says of Level 1 bite behavior: "The dog is certainly not dangerous and more likely to be fearful, rambunctious, or out of control." A snap is a warning. It communicates that your dog is feeling threatened, possessive or irritated, or that something you just did hurt him. You were not bitten because the dog does not want to bite. It's important to respect the warning and determine what provoked it.
Snapping can say anything from "Don't do that" to "You startled me." It means whatever you just did, don't do it again. An action the dog interprets as threatening, such as being grabbed suddenly, can provoke a snap or a bite, depending in part on the dog's temperament and bite inhibition. Being touched unexpectedly in a sensitive area can do the same. It's up to you to figure out what you did, and modify your actions to prevent a recurrence. A dog who snaps could easily have bitten you, but did not. Punishment would be unfair and would accomplish nothing except to teach the dog you can't be trusted to be fair.
Dogs sometimes have the same concept of possession as a 2-year-old child: "It's either mine or it's yours, and if it's mine, I gotta protect it." This guarding instinct can apply to food, a toy, a bed (or couch) or a human being. A dog trained to guard may regard the human at the other end of his leash as his to defend; so does the Chihuahua who snaps at anyone who comes close to Mama.
Dogs often snap at insects flying close to them, sometimes because the insects are attacking them, and sometimes just for entertainment. Some dogs snap in the same way when no insects are nearby. According to Dr. Dennis O'Brien of the University of Missouri College of Veterinary Medicine, a dog who seems to be snapping at imaginary flies may be having a complex partial epileptic seizure or hallucination, or may have an eye problem or some other neurological problem.
Any animal in pain is apt to snap a warning at anyone who touches it, or tries to. If your pal snaps when you try to clean his ears, he may need to see his vet for treatment of an ear infection. An emotionally stressed dog -- for instance, a dog in a tense encounter situation -- may snap at anyone who comes close to him. Small children may pull a dog's tail once too often and earn a warning snap.