Procainamide exerts its effects by inhibiting the sodium ion channels in the heart, which reduces the speed of electrical conduction. This mechanism helps to restore normal heart rhythm and maintain a stable heartbeat in patients with arrhythmia. The drug is metabolized in the liver and excreted by the kidneys.