The purpose of this exercise will be to get puppy to stop whatever he was thinking of doing. With time this may include not jumping on the sofa with dirty paws, leaving the food on the table, or the food in the child's hand.

Hold a treat in your hand and have a few in your other hand. (You are going to reward puppy from the hand not used to teach the exercise.
The single treat is in your closed fist. Hold it in front of puppy's nose.
Puppy will sniff it, paw it, lick it and do whatever else he thinks will let the treat escape from your hand.
The moment puppy stops making contact with your hand - for whatever reason - you reward him from your other hand.
Repeat this a few times. When puppy consistently moves his head away from your hand with treat in you add the verbal cue 'leave.'
As you give the treat from the other hand you can add the cue 'take it.'
As puppy understands this exercise, you can start holding the treat in an open hand and repeat the exercise.
If puppy is successful in leaving the food in your open hand (and being rewarded from your other hand,) you can lower your hand until you can put the food on the ground, give the verbal cue 'leave' and as puppy backs off tell him to take it and give the reward from your hand.