This is what I do. How long it takes depends on the dog's breed and what he's been getting away with. The quickest time it took was less than ten minutes with a chihuahua, but a full week with a little mixed girl who had been pulling for over a year.
Use a harness and a long lead. I prefer twenty feet, but if you have a tiny dog and are in the city, ten foot works. Go to the area you can work in, a park or field, somewhere that is open and there are few distractions. Move forward, ignoring the dog. Head to a specific spot, like a swing set or tree. Your dog will try to go where he wants to go, but you pull him along with you. You are leading the hunt. If he gets ahead of you and pulls you, make an about face and walk in the opposite direction. There are tricks for a large strong dog, but if you can do the tree stand for 30 minutes, this is probably not a problem for you. Yes, you will be pulling back, but as soon as he decides to follow you the leash will slacken. You head in another direction, he must follow you. Change directions again. You can move in a triangle pattern, a square, or a star, but you do not let the dog pull you. Do not cajole or chastise or speak to the dog in any way, just change directions to complete your pattern. If after a suitable amount of time (30 - 45 minutes) he is still ignoring you, don't worry about it. Just go back home. Repeat the next day (or again later in the day). What you are teaching him is that every time he feels pressure from the harness, he is moving in another direction. And, he needs to pay attention to you because you randomly change directions.
When he is acting more compliant and paying attention to you, start working him on the commands he already knows. Recall when he is two feet from you, when he is five feet from you, when he is ten and twenty feet from you, praise and treat. Sit when he is close to you, sit when he is five feet from you, sit when he is ten feet from you, and so on. Move on to down. Recall, sit, and down will give you more control than the leash does. He will see it as a game. This way, when you are in your usual places he will mind you better, remember dogs don't generalize so you have to retrain them every where you go. When you have him good with recall, sit, and down, work on heel.
For heel, I would practice at home using a wall on the left and having him sit at your left side. Treats and praise, clicker if you have one. On the walk, call him to the heel, using the treat to lure him where you want him, then releasing him. Get him to stay longer and longer at the heel.
For my fosters, I use long line work to get them to stop pulling and pay attention. It helps in the house as well, dogs I work on the long line behave better. I don't usually work on heeling because most people don't care if the dog heels.