Foxes occupy a unique place among Animal Stereotypes. They can be good guys, bad guys, or completely neutral, but they're always crafty, clever, and cunning. Their sly nature sometimes results in illegal activities, so it's not uncommon to see them portrayed as thieves or con artists; in other words, they're a classic Trickster Archetype. Although it is not unknown for them to be too clever; another term for Too Clever by Half is "outfoxing yourself". Sometimes this trope is invoked under the phrase "crazy like a fox" for when the brilliant plan seems crazy to anyone who isn't quite as brilliant. They're sometimes your adventurous Canine Companion.
This stereotype is, to some extent, Truth in Television: Foxes do live in family groups like wolves, though they tend to hunt by themselves, and they are more known for stealing farm animals in the dark of the night than outright attacking them in broad daylight. The "crazy like a fox" part has roots in real fox behavior as well; red foxes have been known to jump around and act crazy to entice curious rabbits into coming closer.
If the work in question is East Asian (or inspired by any East Asian culture), expect the fox to be a magical creature with the same stereotype of guile and trickery associated with it.
Compare Fantastic Foxes, which combines this archetype with a touch of the supernatural, and Foul Fox, for when foxes are outright cruel or evil. Compare further Those Wily Coyotes, for another stereotypically clever wild canine, and Rascally Rabbit, Rascally Raccoon, Sneaky Spider, and Stealthy Cephalopod for other trickster animals. It's not uncommon to pitch a Rascally Rabbit against a cunning fox, with the two of them trying to outsmart each other. Not to be confused with a certain Desert Fox, even if he was quite a cunning one. Also not to be confused with a Silver Fox.
See also Foxy Vixen, the other major stereotype associated with foxes.