Stretching or massaging the muscle will usually release the cramping associated with a charlie horse. Be sure to stretch slowly to allow the muscle spasm to release. Heat may also help if the cramp is particularly severe.
Massage the area, this will get the blood flowing again and should also ease some of the pain. Try no to use the muscle until the spasm is over, and once it has ended try flexing the muscle to get it going again
Iodine deficiency can cause charlie horse cramps. Quinine (found in Canada Dry or Schweppes Tonic Water) causes immediate release of charlie horse cramps - however, use sparingly because over time (3..4+ years of weekly use) the effect of quinine diminishes.
For immediate relief of a charlie horse, I squeeze my upper lip very hard. Although it does not work for everyone, it does work quite effectively for me. For more long term effects, I find streching and drinking water helps.