Stable vices
Stable vices are stereotypies of equines, especially horses. They are usually undesirable habits that often develop as a result of being confined in a stable with boredom, hunger, isolation, excess energy, or insufficient exercise. They present a management issue, not only leading to facility damage from chewing, kicking, and repetitive motion, but also leading to health consequences for the animal if not addressed. They also raise animal welfare concerns. Stereotypical behaviors in animals are generally thought to be caused by artificial environments that do not allow animals to satisfy their normal behavioral needs. Rather than refer to these behaviors as abnormal, it has been suggested that they be described as "behavior indicative of an abnormal environment". It was once thought that stable vices may be learned by observing other horses already performing the behaviors, but studies on the topic to date have failed to establish this as a cause. Stereotypies are correlated with altered behavioral response selection in the basal ganglia. Although a more enriched environment may help minimize or eliminate some stereotypical behavior, once established, it is sometimes impossible to eliminate them due to alterations in the brain. Examples
Stereotypies in equines are usually placed into one of two classes:  Locomotor or Oral. Common stable vices include:
Wood chewing (lignophagia):  Gnawing on wood out of hunger or boredom. This is not to be confused with the more serious vice, cribbing. Cribbing, also called windsucking:  When the equine grabs a board or other surface with its teeth, arches its neck, and sucks in air. This can harm the teeth and may lead to colic. Cribbing can be caused either by nervousness or boredom. It was previously thought to release endorphins in the horse, but recent research suggests this is a fallacy. Additional research suggests that cribbing increases salivation and may reduce stomach discomfort. There is a direct correlation between diet and cribbing; increasing hay in the ration or feeding more frequent meals appears to help. Cribbing occurs in 2.4–8.3% depending on breed and management. Weaving:  Rocking back and forth in a repetitive fashion that is correlated to isolation or stall confinement, usually alleviated by pasture turnout. Possibly a self-stimulating behavior. Problems with weaving can include weight loss and uneven hoof wear, unnatural stress on the legs and lameness. Wall kicking:  Kicking the walls of its stall with hind legs. This raises the potential of injury to the equine and damage to the barn. Usually this is caused by a lack of exercise and boredom. Wall-kicking is one habit that is often acquired by others in the barn once an individual starts doing it. Stall-walking or fence-walking:  Like weaving, this is a repetitive movement, only the individual paces compulsively. It is usually correlated with isolation or anxiety while awaiting feed. This habit can also lead to weight loss and lameness. Pawing or digging:  The equine may paw with its front feet. This can lead to abnormal hoof wear and lameness, and may also damage the flooring of the stall. An equine that paws can dig a noticeable hole in a dirt-floored barn in a very short time. Some behaviors are not classed as stereotypes, but are viewed as undesirable behaviors for health or safety reasons:
Biting:  A nervous or anxious equine may reach out of its stall to bite at passersby, humans or animals. Box stall designs that keep the horse from reaching its head out prevent harm to other animals, but some horses may attempt to bite a handler when the person enters the stall. Bolting feed:  Eating food too fast without adequate chewing. This can potentially lead to certain problems in the digestive system including choke and colic. Masturbation:  A male horse, either a stallion or a gelding, will use his abdominal muscles to rhythmically bounce his penis against his belly. Previously believed to be a vice caused by boredom, confinement, or discomfort, masturbation by stallions and geldings is now viewed as a normal behavior. Horses may engage in a number of undesirable behaviors when being ridden or driven. These are not "stable" vices, but are often classified as "vices" in terms of being behavior that poses a danger to the animal or its handler. These include: 
 Head-shaking: Where a horse shakes its head repeatedly for no obvious reason, a condition with many possible causes from insect annoyance, dental problems, allergies, sun exposure or nerve damage. Bucking: May be misbehavior or a result of discomfort. Rearing: a normal behavior at play, but dangerous around humans, when it is often triggered by fear or pain. Bolting or running away

Other equine behaviors that may (or may not) arise from boredom or frustration, but still present management challenges. These include destruction of buckets, mangers, and feed tubs; defecation in the manger or water bucket; dumping water buckets; sloshing feed in water and then scattering it on the ground, and so on. There is little that can be done to stop them, and other than hygienic considerations, they present few health or safety concerns. Modern husbandry and the effects on behavior 
Horses are extremely social creatures, and the process of domestication has not altered their need for social interactions. Also, in the wild, horses are constantly grazing; they are called trickle feeders because they continuously eat small amounts of forage throughout the day, except the approximately 2 hours that they spent sleeping. Modern equine husbandry sometimes creates conflicts with the horse’s natural behaviors; some owners keep their horses confined to a stall with minimal turnout time, little to no social interactions, and sometimes inadequate amounts of roughage. This can be problematic as this system of equine husbandry completely ignores certain basic needs, such as social interactions, foraging, and locomotion. Studies have shown that horses that are offered low quantities of forage and minimal social contact have a higher reported level of stereotypic behaviors such as cribbing, wind sucking, weaving, and other stereotypic behaviors. Social interactions are important to horses; mutual grooming has been shown to reduce heart rate and cortisol levels, therefore reducing stress. Play behavior between two horses aids in the development of the musculo-skeletal system and cardiovascular fitness; play allows practice of reproductive and survival skills. Living in a group also has an adaptive significance, as younger animals living within the herd will learn from the other members of the group. The amount of forage a horse is given or has access to is extremely important as the equine digestive tract continuously produces acid, therefore the horse’s digestive tract must contain food most of time; if a horse is without forage for more than 3 hours, the acid in the digestive tract will build up which can cause ulcers, diarrhea, and potentially colic. Behavioral problems can also develop because the horse is in pain from the ulcers that are a result of the low quantities of forage. The process of chewing produces saliva, which the horse uses as a natural antacid; if the horse has no hay or pasture to chew on, the antacid will not be produced and the horse will find anything to chew on to try and produce saliva, which can be the start of an oral stereotype. Solutions
In most cases, reducing confinement and providing the animal a more natural setting reduces the incidence of stable vices. There are stopgap "cures" that can be provided in the stall to keep a horse busy or out of trouble, including increased exercise, feeding of larger quantities of lower-quality food (so the animal spends more time eating and less time being bored), feeding more frequently, or cutting back on grain or other high-energy concentrates. Toys such as a ball or empty one-gallon plastic milk jug can be hung in the stall. Sometimes simply giving the animal a companion in the next stall, or even a smaller animal placed in the same stall, also helps a bored or nervous horse. In extreme cases, a short term fix may include various forms of restraint. However, none of these practices solve the underlying problem, some may raise animal welfare concerns, and the animal will resume its behavior as soon as the restraint is removed. The long-term solution that has the most success is to give the horse less time in the stall and more free turnout time. See also
Horse care
Horse behavior
List of abnormal behaviours in animals
Horse tongue

References

Ensminger, M. Eugene. Horses and Horsemanship. Interstate Printers & Publishers; 4th edition (1969). ASIN: B0006BVLOM
Price, Stephen D., et al. The Whole Horse Catalog. Fireside; Rev Upd edition (1998) , 
Mills, Daniel. "Recent Advances in the Treatment of Equine Stereotypic Behaviour." Havemeyer Foundation. Web site accessed July 27, 2007 at http://www3.vet.upenn.edu/labs/equinebehavior//hvnwkshp/hv02/mills.htm
Ryder, Erin. "Hoofing it with John Henry,"  The Horse, online edition. Web page accessed August 25, 2007

Abnormal behaviour in animals
Ethology
Horse behavior
Horse management