An electrocardiogram, abbreviated as ECG, measures the electrical currents of the heart and uses a device to record them as a graph. This enables doctors to assess the heart function and identify any abnormalities.