The thomp-thomp of your heart beat will occur roughly three billion times in your lifetime. Over the last hundred years, scientists have learned a lot about the heart's mechanisms, as described in the dense, but clear video from the Guardian above. This is a summary of how a single heartbeat occurs, based on the description Michael Shattock of King's College London gives therein
Pacemaker cells at the top of the heart get things going, putting out an electrical signal on a steady but variable rhythm based on the body's needs. That signal spread down through the top chambers of the heart to the atrioventricular node, which directs the signal rapidly to the bottom of the heart. The pumping motion then spreads upward. Shattock noted this wiring makes for an efficient mechanism.
The electrical impulses that induce a heartbeat are generated by individual cells exploiting differences in the concentrations of sodium and potassium ions. (Ions are the name we give to molecules carrying an electrical charge.) There is lots of sodium outside the cell and relatively little inside whereas there is lots of potassium inside the cell and not much outside. Proteins open up channels through the cell membrane and like cold air rushing into a warm house, the sodium molecules push into the cell. Remember the molecules are ions, so a higher concentration of them makes the cell more positive. That's the electrical action that we call a nerve impulse. To end the activity, potassium channels open up and potassium rushes out of the cell, bringing down its positivity. Sodium is also pumped out of the cell through what is called active transport.
"How does that electrical activity translate into mechanical activity?" Shattock asked. The key to that action is calcium. During the period in which the cell's membrane is charged -- the action potential -- calcium enters the cell. The calcium triggers the release of more calcium from tiny bags -- sarcoplasmic reticulum -- filled with the element. Then, the calcium diffuses to the muscle filaments themselves and causes the actual movement. To relax the heart cells, the extra calcium that came across the cell membrane gets pumped out, and the heartbeat ends. Then, the process happens again and again until you die.