Nobody likes a badly behaved dog. The dog owner is embarassed and passers by and visitors hate being troubled by a nuisance dog even if it not actually a dangerous dog.
Having decided that you want to have a well trained dog you can choose to either get somebody to train your dog for you or you can do your own dog training. Working with your dog yourself will create a terrific relationship between you and your dog.
There are dog training classes available in most areas and this might be an option you want to consider. You will need to start training at the start of the course and that may not be for a while and you will need to go regularly each week with your dog for the weekly sessions.
The first rule of dog training is that you should always praise your dog when he does well. If he has responded well to your instructions then you should congratulate him and tell him what a good boy he has been.
Dogs want to be loved so the more you show how much you love your dog the more he will want to make you happy. When he is doing well and you give him lots of encouraging praise he will remember that by doing things properly he got a lot of love and attention and next time will try extra hard.
Give him treats. If at the end of the training, he has done a good job, then it is best to give him treats. It is the prize that awaits him for all his hard work during the day. However, if he has not performed well, don’t mistakenly give him the treats because that is likely to allow him to think that he can have the same reward even if he has not done anything good.
Shouting at your dog or hitting him will be counter productive. You are aiming at having a dog that behaves well because he wants to not one that behaves only because it is scared. Love and praise work much better than being unkind to your dog. Be firm and command his obedience but let him obey because he loves you and wants to please you, not because he is scared.
Try to develop a regular routine for your dog training. A short contructive period every day is far better than a long session once a week which may leave your dog tired and confused. Keep the training to short periods and just practice one thing at a time.