Toby, Dog Toby, or Toby the Dog was the dog in Punch and Judy puppet shows. He was generally said to be the dog of Mr. Scaramouche, although they did not always appear together. It is not uncommon to hear Toby referred to as Mr. Punch's dog, but this is not his traditional owner.
Dog Toby was a mischievous foil to Mr. Punch; while Mr. Punch does bad things and we hate him, the dog does bad things and Mr. Punch hates him, while we laugh at Mr. Punch for matching wits with an animal. Toby is very much a sideshow, in every sense; Mr. Punch is not going to get hanged for anything he does to a dog, and while the dog is quite often going to outwit Mr. Punch, it is not Toby's role to bring Mr. Punch his comeuppance. Moreover, Toby was originally played by a live dog; while these Toby dogs interacted with the show, did tricks and took cues from the puppets, and most certainly helped to draw a crowd, they cannot really take part in the violence in the way the puppets can.
Most traditionally Toby is a medium small dog, often white with black spots, wearing a red and white ruff for a collar -- and yes, this is where the term Toby collar comes from. Toby was once one of the highlights of the show, but when it became more common to have him played by a puppet he fell from being a major star to being just another of the dozens of characters rotated through the shows.
Toby is still a common dog's name today, although it is unclear if this trend can be credited to Punch and Judy. It is also unclear where Dog Toby gained his name. At this time toby-man was slang for a thief (and Toby might well steal a string of sausages); Tobit's dog was a popular reference (I think as a reference to inane theological debate); and perhaps most importantly of all, Toby was an easy name to say clearly through the puppeteer's swazzle.