Teaching your puppy the "leave" command is quite important. This command can be used in a variety of situations, some which even may be life-threatening to your puppy / adult dog. You can start teaching this when your puppy is around 12 to 16 weeks old.
Charlie when he was 6 weeks old
To commence training "leave" had a good supply of tasty treats on hand and be prepared to have fun with your pup. One of the easiest ways to teach leave, is to use leaving food as a beginning. Get a piece of food your pup has not eaten before, which is at the same time not likely to be greatly appealing - half a cracker for instance. Have your puppy on a flat collar and lead. Place the new treat on the ground, making sure your puppy notices you do this. When he approaches the treat say "Leave" in a gruff voice, and the second he looks away from the treat or even stops forward motion towards the treat (some pups may need to be restrained and physically turned away from the treat), go crazy with praise in a high happy voice and make sure he gets a few very yummy treats. Repeat this around 2 - 3 times in a row, about twice a day for a few days. Even the most obtuse puppy will be quick to realise that the reward for leaving is far better than what they were headed for.
Once your puppy is responding well to this, try using other things to leave. Scrunch up some old paper and drop on the ground, put a biro down, perhaps a shoe - you are only limited by your imagination. At all times be very consistent with the "leave" command and make sure that you always make a big fuss of your puppy when he does the right thing.
When you feel your pup has really got the hang of leaving things, progress to training him outside, again setting up a few things for him to leave. If he is successful at this, try getting him to leave something you just happen across when walking outside. Young puppies are attracted to lots of things so it will not be hard to find a moment to practice leaving it.
Your puppy should by now be very good at this 'trick'. You could now start to apply it in the day to day living with your dog. For instance, your puppy is approaching an electrical cord, so tell him 'leave' and remember to praise as well. It can be used if your pup looks like playing with an insect, or with a cane toad (for those of you in the tropics) etc. You will be surprised at just how useful this command is. And with proper fun, consistant training, your puppy will love 'leaving' it too.