Walking your dog should be an enjoyable time, not a tug of war between you and your dog. There's no need for your dog to stare at you constantly and stay glued to your knee, like a highly trained obedience animal, but he should walk calmly on the lead, neither pulling ahead or continually stopping to sniff and mark his territory.
Prepare For Success
When teaching your dog to remain by your side, your walks will not be good exercise sessions. It will be difficult for your dog to pay attention to you and do what you expect if he has excess energy he needs to burn off. Before every walk, take some time throwing a ball, playing tug of war, or otherwise letting your dog burn off some steam, so he will be ready to focus on you when the time comes.
To stop your dog from constant pulling, he needs to quit being rewarded for the behavior. Instead of walking quicker or nagging at him with constant tugs on the leash, stop walking as soon as he hits the end of the leash. If he stays at the end of the leash tugging, ignore him. As soon as he turns towards you and puts some slack in the leash, call him to you and give him a treat. Continue walking, stopping and not moving when he pulls, and giving him a treat when he comes back to you. It is important to be consistent so he learns every time he pulls on the leash, you will stop moving.
Get Him Moving
If your dog's problem has more to do with him stopping frequently to sniff and nose around, you can teach him to stay beside you by keeping a few treats in your leash hand and randomly slipping him one when he is where he is supposed to be. When he lags behind, give him a quick command, such as "Let's go," and keep walking. Once he is by your side, slip him a treat.
Getting Him To Your Side
In addition to teaching your dog to walk beside you, you will also want to teach him to come to your side whenever you ask. To do this, teach him to come on command. Start by walking along, with your dog on the leash. Say "Come" and take off running. After running a few yards, stop and give him a treat. Once he reliably runs alongside when you give him the command, start running in different directions, so he has to turn to follow you. When you are confident that he understands what you want, you can practice off leash in a confined area. Be sure to reward him with a treat, so he remains motivated to come quickly to your side whenever you call.