An arrhythmia is a disorder of the heart that affects the rate or rhythm at which the heart beats. An arrhythmia occurs when electrical impulses, which direct and regulate heartbeats, don't function properly. This causes the heart to beat too fast (tachycardia), too slow (bradycardia), prematurely, or with an irregular rhythm.