How to stop barking

How to stop barking

Hi Everyone, I was wondering what the best way is to stop a border collie from barking all the time?  I go out during the day and my border collie apparently drives the neighbours crazy. But when I am home, I don't hear a thing from him.