Dogs have lots of reasons for barking. Sometimes they are sending the alert or alarm that something is happening they want you to know about, intruders or some other possible threat. Many times they're letting you know that they need or want something. It might be a walk to relieve themselves or they may have some issue of pain or discomfort they need to communicate. It could well be that they just miss you and want some attention.
These are acceptable forms of barking. The unacceptable sort is the incessant noise that dogs often resort to as a result of being bored or frustrated. You need to help your dog learn what barking is acceptable and what isn't.
Use firm and consistent language when you ask your dog not to bark. Don't scold or reprimand but take care to be consistent and clear when you demand silence.
Be sure your dog has plenty of exercise to take care of his physical needs.
Also, address his mental requirements. Dogs are social animals and crave company so long periods on their own can be extremely boring for them.
Plenty of walks and play or training time will help. Dogs typically need about an hour of exercise per day. Some breeds may require more and the need can vary among individual dogs according to age and temperament.
Lots of dogs enjoy the puzzle toys that allow them to spend time trying to get a treat out of a container. These kinds of activities help the dog enjoy the hours he spends on his own and cuts down on his boredom.
If the dog barks as a result of being frightened or excited by a certain thing, maybe the vacuum or the leaf blower, you should try to desensitize him. Don't scold or reprimand him. Instead, feed or play with him close to the source of his fear. This will teach him that it isn't an object to be afraid of and stop his barking at it.
Counter noise, the use of a sound much louder that his barking, is a good way to startle your dog into paying attention and taking his mind off his repetitive barking. You can use an air horn or strike two cooking pans together. One important tip is that you must have good timing with this and start the counter sound the instant he begins to bark or he won't make the association.
Always remember to be consistent in any training and provide your dog with enough activity, both mental and physical, to meet his needs and the problem barking will be minimized.