An ECG (Electrocardiogram) machine is a vital diagnostic device that records the electrical activity of your heart. It translates these electrical signals into graphical waves, helping doctors quickly evaluate your heart rate, identify abnormal rhythms (arrhythmias), and detect signs of a heart attack.