is a dog that “takes the earth,” or unearths his prey. Dog Tray is merely an abbreviation of the same word. Terrier is also applied to the hole which foxes, badgers, rabbits, and so on, dig under ground to save themselves from the hunters. The dog called a terrier creeps into these holes like a ferret to rout out the victim. (Latin, terra, the earth.) Also a land-roll or description of estates.
There are short-and long-haired terriers. (1) Short-haired: the black-and-tan, the schipperke, the bull-terrier, and the fox-terrier. (2) Long-haired: the Bedlington, the Dandy Dinmont, and the Irish, Scotch, and Yorkshire terrier.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Terrier from Infoplease: