This is a rather simple exercise, but very important for your dog to know. It is best to teach this when he is hungry.
Divide his meal into several portions, throughout the day, call him to you using his name and the command “come” tempting him with the food.
A hallway is an idea place to teach your puppy this command, as there are few distractions, and his attention is easily centered on you. Standing a short distance away, show him the food in your hand, call him by name, when he starts to come to you, issue the command “come”.
Praise him for this action, calling him a good dog in a very excited voice, the excitement in your voice lets him know that he has done something to please you and a dog will do anything to please you.
As he gets closer to you, kneel down and praise him again at his level and give him the food while you stroke him and touch his collar.
After he has been completely trained to come to you indoors, take him outside, to a slightly more distracting location. Keep him on his long lead to insure his compliance.
Dont use the lead to reel him in, he is not a fish! Encourage him to return with the treat and the excitement in your voice, just as you did in the hallway. If he has lost concentration, give a sharp tug on the lead to get his attention again, and then use the excitement and reward to get him to return to you.
In this situation a squeaky toy may be a better reward than food, as it may be easier for him to see and hear.
Remember that to keep a dog from doing something he is not supposed to do you must first distract him and get his attention back on you, preferably before he has misbehaved.