The heart pumps by generating electrical impulses to contract the heart muscles in a precisely coordinated manner, and keep the heartbeat regular.
Normally, the heartbeat starts in the right atrium, when a special group of cells (the "pacemaker" of the heart) sends an electrical signal causing the muscles to contract. These signals travel through connecting fibers to all parts of the ventricles, and must follow the exact route in order for the heart to pump properly.
An arrhythmia occurs when the heart beats too fast, too slow, or irregularly. This keeps the heart from pumping blood properly.
Every cell in the heart muscle tissue is capable of starting electrical impulses. That's why we all experience an occasional premature, rapid or irregular heartbeat. These are called palpitations, and are usually a benign condition. But irregularities that happen often indicate arrhythmia, which occurs when another part of the heart takes over as "pacemaker," disrupting the usual route.
There are many types of arrhythmia, identified by where they occur in the heart (in the atria or ventricles), and by what happens to the heart's rhythm when they occur. One example is atrial fibrillation, an irregular heartbeat that interferes with the heart's ability to pump blood. Abnormal electrical signals cause the atria, or upper chambers of the heart, to contract erratically. Blood then pools in the atria and forms clots. These can travel to the brain and cause a stroke. The most serious arrhythmia is ventricular fibrillation, where the lower chambers quiver and the heart can't pump any blood. This results in collapse and sudden death -- if there isn't immediate medical attention.