We all know what a varmint is, thanks to Yosemite Sam (and others). It's an annoying animal (or person), the fauna equivalent of a weed. It's something (or someone) who takes your nice, tidy set-up, your lovely garden or lawn or your livestock, and makes a mess of it. Before you had a good environment; now you have a nasty varmint. The last four letters notwithstanding, a varmint leaves nothing in mint condition, be it farm or be it garment.
If you want to arm yourself against varmints, you get yourself a varmint rifle. That's an actual class of gun, an informal but well-maintained designation for small-caliber guns and high-powered air guns designed for varmint hunting. Because after you've gone into the environment and rearranged it and tidied it up to suit your needs, ploughed it and fenced it and taken what you need to feed yourself, it's mighty annoying to have some critter come along and rearrange things to suit itself so it can take what it needs to feed itself. So coyotes, gophers, weasels, foxes, porcupines, jackrabbits, what have you, are the targets when you go varmint hunting.
Where do these things come from, anyway? They're already there, of course; they just become varmints through our conflicts with them. But that's just nature being the way it is. Nothing stays tidy because too many critters are involved.
And where does this word come from? It's a variant of vermin, as you may have guessed. It's most strongly associated with the southern side of the United States, but it is attested first in England, and as far back as the 1500s. How did vermin become varmint? I'm tempted to say it's the same way creature became critter, and to some extent it is so: just as critter is formed by the vowels becoming "short" rather than "long" as in creature, varmint also has a vowel alternation. But the one in varmint is a regular and expectable realization of Middle English short e: we see it in parson (a different realization of person) and Clark (same origin as clerk), and a few pronunciations such as "darby" for Derby.
And how about that t at the end? Well, it just showed up. It's intrusive. Invasive. Excrescent is the technical word. It's another thing that pops up here and there in English — against used to be agains, and many people say sense as "sents," for instance.
So we had this nice, tidy word vermin, taken from Latin (originally vermis 'worm'). And then language and people happened to it. Now vermin is the more mannered word. If you want to sound rough-and-ready, like you're packing a varmint rifle (maybe loaded with those exploding bullets sold under the brand Varmint Grenades), you say varmint. Anyway, vermin is a city word for city animals: mice, rats, insects of various kinds. A varmint can be a larger kind of thing, just as the first vowel in varmint is wider and the word is longer — and the countryside is more open.