Foxes will only attack a selective number or mobs: Wolves(tamed or not), bunnies, mice, birds, insects, snails, slugs. They are neutral mobs that will only attack you if you attack them first. Drop 0-3 fur and/or leather when killed.
If you have a bunny on your head the fox will follow you and try to kill the bunny.
BehaviorEditThey are solitary animals and rarely seen together with another fox. Naturally they wander about and kill smaller animals than itself. If the player approaches it will not care or flee, depending on its current state. So if it's killing something it will ignore you, if its wandering about then it might consider to flee. The thing players might find annoying (or amusing) is the very odd noises they make. They make little squeak noises similar to that of squeaky toys or of small birds.
Foxes can be tamed by right clicking on them with a raw turkey in your hand.