The ECG machine measures the tiny electrical voltage changes detected at the skin surface, which are generated by the propagation of electrical impulses through the heart. These voltage changes represent potential differences between different points on the body surface caused by the heart's electrical cycle. While these electrical events trigger heart beats and muscle contractions, the ECG directly records the electrical potentials.