Hi, Sometimes the exact cause can't be determined but remember that it is a disturbance in the electrical system of the heart. I'll just mention a few things involved with determining heart rate and rhythm.
Each cardiac cell has hidden within itself the potential of generating the electrical impulse that under normal conditions will cause the heart to contract. Most of us have an area that is referred to as a natural pacemaker that is especially suited to be the dominant source of heart beats. This area is the sinus node....thus sinus rhythm.
Different areas in the heart generate different rates.
Generally the higher up in the heart a beat is generated the faster the rate will be. Atrial rates can be very fast. In fact sometimes so fast the the heart defensively blocks some of them. We talk alot about atrial fib here but atrial flutter is actually like atrial fib but with the heart successfully blocking some beats and letting others come through in a nice regular fashion. Atrial fib is always irregular. Atrial flutter is regular.
When the upper chambers for whatever reason fail to set off a heartbeat producing impulse then the lower chambers (ventricles) pick up the slack and do so. They are usually not able to generate as fast of a rhythm. Usually the rate produced here is somewhere between 40 and 60 bpm.
Even in perfectly healthy hearts there will be some arrhythmias at times. When a heart is stressed for whatever reason it becomes more sensitive and prone to have irregular (ectopic) beats. When the sinus node becomes sick it is called sick sinus syndrome
and many pacemakers are implanted to take over the sinus node function. If the sinus node is still active but working erratically then the node can be zapped (ablated) so it won't compete with the mechanical pacemaker. "Demand" pacemakers monitor rates and kick in when needed.
Some irregular beats are much more worrisome than others. The beats generated in the atria...PACs (premature atrial contractions) are bothersome because they are different than our natural rhythum but don't usually cause any problems. Likewise, some beats that are generated in the ventricles...PVCs (premature ventricular contractions) are also not too worrisome. For instance, if the atria are not generating a heart beat or if the impulses for some reason are not reaching the ventricles, they the ventricular beats are all that is keeping the heart going.
The heart contracts and then has to recharge in order to contract again. This is a cardiac electrical cycle. At times during the cycle the heart is unable to respond to an impulse. Other times it is extremely sensitive to any stimulus. Sometimes several areas of the heart are all trying to take over the command role of pacemaker and can make for an irregular rhythum. When a impulse is generated during a sensitive period then sometimes it sets the whole electrical system in havoc and it either stops on its own or it needs to be "converted" (reset) with drugs or a stronger electrical current (paddles on chest).
So, if you keep in mind that it is an electrical disturbance than it is easier to see how drugs, electrolyte imbalances, stretching of a cardiac chamber as it enlarges, or disease to the cardiac tissue itself can all lead to irregular beats.
I may have just made this more confusing but hopefully it may help.