The use of increasingly complex cardiac implantable electronic devices (CIEDs) has increased exponentially in recent years. One of the most serious complications in terms of mortality, morbidity and financial burden is represented by infections involving these devices. They may affect only the generator pocket or be generalised with lead-related endocarditis. Modifiable and non-modifiable risk factors have been identified and they can be associated with patient or procedure characteristics or with the type of CIED. Pocket and systemic infections require a precise evaluation and a specialised treatment which in most cases involves the removal of all the components of the device and a personalised antimicrobial therapy. CIED retention is usually limited to cases where infection is unlikely or is limited to the skin incision site. Optimal re-implantation timing depends on the type of infection and on the results of microbiological tests. Preventive strategies, in the end, include antibiotic prophylaxis before CIED implantation, the possibility to use antibacterial envelopes and the prevention of hematomas. The aim of this review is to investigate the pathogenesis, stratification, diagnostic tools and management of CIED infections.