Each heartbeat generates an electronic pulse that travels through the heart, so an ECG monitors the electrical activity of the heart.
The electrical pulse contracts the artery muscles, which causes the heart to pump blood. The test detects and identifies any aberrant electrical activity that could indicate a heart problem or put you at risk of developing one.
By measuring the time it takes for electrical pulses to flow through the heart, the ECG test is an excellent diagnostic tool for determining how well the heart is working.