Though from the dog's point of view this is a normal and quite desirable behavior, it is undesirable to us. Always view the behavior from the dog's point of view first, then the human's point of view. Finding out what the motivation is will help aid you in prevention, management, and eliminating the behavior. The first step in changing the undesired behavior is to identify the ABCs.
A stands for Antecendent, which is the trigger for the behavior. It may be related to social interaction, an inanimate object, a sound, or a smell. Ask yourself, in what specific situation does the behavior occur? For my issue, it is any food in sight.
B stands for Behavior, the actual problem or undesirable behavior the dog performs. Looking at your dog's body language and understanding normal and abnormal behavior is helpful. For our problem, it is sitting very close to me and staring at my food or me.
C stands for Consequence, the dog's perceived consequence of the behavior. First, ask yourself, what did the DOG get out of the situation? Secondly, especially in social contexts, ask how the consequence of the behavior affects others. The consequence of staring at my food and being very close to me is sometimes the dog will hit the jackpot and I will accidentally drop a delicious piece of glorious food!
The motivation is now probably very clear! Remember that dogs are amoral, self-centered, and opportunistic....not malicious or spiteful. Some behaviors are self rewarding such as chewing (feels good to teething puppies) or peeing on the floor (bladder is emptied...ahhh). Human reinforced behaviors generally relate to behaviors that are socially motivated and are reinforced with human attention. A jumping dog is usually talked to, touched, and petted.
Is there anything you can do to prevent this behavior? Prevention helps set your dog up to succeed and controls the learning environment so the dog is not accidentally reinforced (the more the dog practices the behavior, the better he gets at it). However, it does not address the underlying motivation or change the behavior.