An electrocardiogram measures the rate and rhythm of the heartbeat. It does this by measuring the electrical activity of the heartbeat over a period of time. It makes use of electrodes that are placed on the skin to detect the small electrical changes on the skin.