There are three types of muscle tissue in the body: skeletal muscle, cardiac muscle, and smooth muscle. This answer pertains to both skeletal and cardiac muscle as they are striated tissues and contraction is based on shortening of sarcomeres found within the individual muscle cells.
A muscle cell first receives a message from a neuron telling it to contract. The action potential (AP) travels down the neuron from the cell body. The electrical change caused by the AP opens voltage-gated calcium channels at the terminal of the neuron causing calcium ions to enter the terminal. The influx of calcium causes vesicles containing the neurotransmitter acetylcholine (ACh) to be released, via exocytosis, from the neuron. The ACh crosses the synaptic cleft, the small gap between the neuron and the muscle fiber and binds to ligand-gated sodium channels. The opening of these channels causes an influx of sodium and makes the charge on the membrane positive.
If this change in charge meets a threshold value, the positive charge triggers voltage-gated sodium channels to open beyond the motor end plate (where neuron and muscle fiber nearly meet). Sodium enters the cell making the region of the membrane where they open positive. This triggers the opening of potassium channels and the closing of the sodium channels. When the potassium channels open, potassium exits the cell and this brings the charge on the membrane back to a negative value. These changes in voltage trigger the neighboring set of channels to open and this continues down the sarcolemma (plasma membrane). This is known as propagation of an action potential.
As the action potential sweeps across the sarcolemma, it travels down invaginations in the sarcolemma called T-tubules. This brings the voltage change very close to the sarcoplasmic reticulum (similar to what you've likely learned as the endoplasmic reticulum in other cells) that contains a pool of calcium ions. This proximity to the voltage change opens voltage-gated calcium channels embedded in the membrane of the sarcoplasmic reticulum and allows calcium to exit to the cytoplasm.
Once calcium is freed from the sarcoplasmic reticulum, it travels to the sarcomeres (the functional units of muscle contraction in the muscle cell). When the sarcomeres shorten, the muscle contracts. Sarcomeres are basically made up of thin (actin) and thick (myosin) filaments that overlap. Actin and myosin are both proteins. When triggered to shorten, heads from the thick myosin proteins can grab onto the actin and pull the actin toward the center of the sarcomere (see attached picture).
The calcium binds to a regulatory protein on the sarcomere, troponin. This protein controls the movement of tropomyosin (another protein) that, in the absence of calcium, covers myosin binding sites on the actin. So, when calcium is not around, the binding sites are covered and the myosin cannot grab onto the actin to pull it toward the center of the sarcomere. However, calcium has now bound to the troponin which then moved the tropomyosin out of the way to expose the myosin binding sites.
Hydrolysis of ATP molecules (produced mainly in the mitochondria that you mentioned in your question) allows the myosin to orient itself to grab onto the actin. The myosin heads then bend so that they pull the actin toward the midline of the sarcomere and the ADP is released. This is known as a power stroke. Binding of ATP molecules to the myosin allow the heads to detach from the actin. This cycle continues to happen over and over again (very rapidly) as long both ATP and calcium are present.
When contraction of the muscle is no longer needed, the calcium is pumped back into the sarcoplasmic reticulum using pumps powered by ATP. The neurotransmitter (Ach), responsible for sending the initial message to contract to the muscle, is broken down by an enzyme called acetylcholinesterase so that the message stops.
**The website link provides good illustrations with explanations of what is happening during the shortening of the sarcomeres.