basicly, muscles are controlled, like most of the body by electric signals that come from the brain via the nerves. so to contract a muscle you need to aply a high ....but not so hight, voltage to 2 electrodes a a distance of a few centimiters(2-3). i have seen lots of circuits that use a simple transistor and a transformer to generate the high voltage, and it was connected directly to the battery...but this way you can generate lots of energy that it is transferred to the muscle and that is dangerous...
i will go to charging a small value cap and the discharging it trough the transformer......much safer, because you know what it the maximum energy that is transferred to the muscle....
hope now you have less questions then you had before reading this