There is a lot of debate on this but many, if not all, cribbers are born, not made - meaning that it's in their genes. A friend of mine bred his Morgan, a cribber, and the foal began cribbing before she was a year old. Some will argue that it is a learned behavior, and it could be also.
As for your mare, once a horse shows signs of cribbing, there isn't much the average owner can do besides a collar. Things like work, and feeding sweet feed, seems to increase the habit. Cribbing is like a drug to a horse. It releases endorphins and is equivalent to drug addiction in a person. The difference is that a person understands what they are doing and a horse just knows that it feels good.
I've heard some member claim that they have cured the habit but, personally, I don't believe it can be done with certainty.
I would get a collar on your horse ASAP. Cribbing can be a major health problem for your horse, let alone what it does to your fences and stalls.