If you've already tried and not succeeded as well as you would like, don't worry, this is not your fault. When you get information that is correct enough and complete enough for you to really understand how dog training works, it will work easily and effectively.
If you might be worried that training your dog is too difficult or time-consuming, then please understand that, like many things in life, it's only difficult until you learn how to do it right. Once you have all the right information, and understand how dog training works, it is easy and effective to do in practice.
Dogs are naturally pack animals (since they were originally descended from wolves and wild dogs), and have an instinctive need to understand what the leader of the pack (that's hopefully you, the owner) wants it to do. This is one of the reasons why training your dog is good for both of you.
One the other side of the relationship, when your dog understands what you want, and obeys you when you wish, this makes you happier with your dog, and the dog loves your positive feedback, so again this is better for the both of you.
Another reason is that both you and the dog are happier if you can be sure your dog will behave as you require in social situations. This makes you proud of the dog, the dog proud to get your admiration, and once again, you both win.