Postoperative atrial fibrillation (POAF) is common among surgical patients and associated with a worse outcome. Pathophysiology of POAF is not fully disclosed, and several perioperative factors could be involved. Direct cardiac stimulation from perioperative use of catecholamines or increased sympathetic outflow from volume loss/anaemia/pain may play a role. Metabolic alterations, such as hypo-/hyperglycaemia and electrolyte disturbances, may also contribute to POAF. Moreover, inflammation, both systemic and local, may play a role in its pathogenesis. Strategies to prevent POAF aim at reducing its incidence and ameliorate global outcome of surgical patients. Nonpharmacological prophylaxis includes an adequate control of postoperative pain, the use of thoracic epidural analgesia, optimization of perioperative oxygen delivery, and, possibly, modulation of surgery-associated inflammatory response with immunonutrition and antioxidants. Perioperative potassium and magnesium depletion should be corrected. The impact of those interventions on patients outcome needs to be further investigated.