An EKG works by recording the electrical activity of the heart. The heart is a muscular organ that pumps blood throughout the body by rhythmically contracting and relaxing. Electrical signals that pass through the heart muscle determine how the heart contracts and the rhythm in which it happens. Small electrodes can be applied to the skin of the arms, legs, and chest to detect these electrical signals. The EKG device both captures and transforms the impulses produced by the heart muscle into a detailed graph that illustrates the heart's electrical activity and rhythm. The graph is composed of several waves, each of which corresponds to a certain aspect of the electrical activity of the heart.