Atrial fibrillation (AFib) is caused by various conditions that affect the heart's tissue or electrical signals, leading to chaotic and irregular electrical activity in the upper chambers (atria) of the heart. Common causes include advanced age, underlying heart disease (such as valvular disease, coronary artery disease, and structural heart disease), high blood pressure, congenital heart defects, heart failure, and inflammation or infection affecting the heart (myocarditis, pericarditis). Endocrine disorders like hyperthyroidism, lifestyle factors such as excessive alcohol consumption, obesity, and sleep apnea are also significant contributors. Genetic factors can predispose some individuals to AFib, especially those with family history or specific gene mutations. Lung diseases, certain surgeries, and some triggers like stress, caffeine, and stimulants may also provoke episodes. Sometimes, no clear cause is found, termed lone atrial fibrillation.