text: Muscle fibers have long proteins called actin that are disposed as "railways" and form a long chain al along the muscle. \nA second protein, miosin, has a movable head that "crawls" up the actin, gragging a limited amount of muscle mass with it. The movement of millions of these proteins produces the contraction of the muscle.\nFor this, muscles need two things: Calcium that allows the miosin head to "glue" to the actin, and ATP (an energy carrier molecule that is produced by the cellular respiration) that gives it the energy to move one step and be dettached for a new cycle.\nWhen exercising a lot, you might consume all of the cellular oxygen or the glucose (the sugar from which cells extract the enrgy). This means a drop in ATP levels. So theres is calcium, the miosin attaches itself to the actin, but cannot move. This means the muscle gets cramped. This is the explanation for Rigor mortis too.\nThe cramps that occurr by dehidration or lack of salts (including calcium) don't have to do with muscular function. Rather, they stimulate the excitability of the nerves that tell the muscle to contract, so they might spontaneusly and continously produce this state, called tetanus (with equal or very similar symptoms to cramps).\nThe lactic acid acumulation someone told you about earlyer is not a cramp. It rather produces the pain you feel AFTER you exercise and rest your muscle, because this is a very insoluble compound that forms abrsive cristals inside your muscle cells, which are very painfull when you move it. Beware of them, because the more painfull it is, the bigger the cellular damage is. And muscle cells are not that easily replaced. If you feel this pain, try not to force the sore muscle.\nThe cramp and the lactic acid acumulation (don't know the word, in spanish it is "agujeta") have, however, teh same origin: An exercise too strong that consumes more energy than the muscular cell can produce by respiration (there's not enough oxygen in the cell to ope with the demand). So if you get a cramp during exercise, very likely you'll get Agujetas the next day.