When a dog is said to be counter surfing, he has the undesirable behavior of eating off the table. Aside from being an unwanted behavior, there are humans foods that can be hazardous to dogs, such as chocolate, grapes, raisins, avocados, caffeine, garlic, and walnuts.
Every time a dog succeeds in getting food or anything off the table, the behavior gets to be compensated. The first step to deal with the problem is to clean all counters and tables of human food, and get your dog to stick to his own pet food. Also, food should be disposed of properly and not left on top of the waste bin.
You should also train your dog to sit down or lie on a mat while you are having a meal. Make sure to highlight desired behavior so he will know that you are happy with his behavior. Learn more here.