Terrier is a group of dog breeds. Terrier dogs tend to be small and fearless, and range in weight from 2-70 lbs.
In 1848, the English Toy Terrier was bred to hunt rats in England. Because it was so small, fast, and agile, they were very effective at killing rats. England had a sport known as "the rat pit" where dogs were placed in a pit and bets were made in whether they would kill their quota the fastest. A black and tan terrier weighing 5.5 lbs killed 300 rats in less than an hour.
Many other terriers existed after this, such as the Yorkishire Terrier in 1874. This dog, like many other terriers, was used to hunt rats. It was also used to help hunters, because of its strong fearlessness to find fox, badgers, and other small to medium wild animals.