Start practicing in the back garden or in a long part of your house (e.g. a hallway) and progress to outside when your dog starts to response.
Assuming you are walking your dog on the left side, hold the lead in your right hand (the lead will cross your body). Have food reward, like chicken or ham in your left hand nearest the dog. Use your left leg as a guide to position your hand and keep it level with you. Your dog will position his nose behind your hand to try and get the food. Your dog is now in a perfect heel position with his head level with your leg completely of his own free will! Start walking and release food every couple of steps and repeat "Heel" or "Close" as you release the food - NB, do not say Heel or release the food if the dog is not in the correct position. The point is to condition your dog to the meaning of the word "Heel" or "Close" to the heel position and for them to associate that position with something nice. The lead is pretty much incidental here really and should be kept loose by the handler. The dog is in the position because he wants to be. As you progress all you will need to say is "Heel" or "Close" (whichever you used in training ) to get your dog into position. Over time decrease the frequencey of the rewards and also make them random.
To help with this, if your dog lunges at something and starts pulling occasionally combine it with turning to your right 180 degrees and walk back the way you came. Your dog will now be behind you. After a few strides you can turn again and continue on your way.
The "look" command is also helpful to get their attention if they are trying to get to something particularly interesting such as another dog.