Epigenetics connects genetic and environmental factors: it includes DNA methylation, histone post‐translational modifications and the regulation of chromatin accessibility by non‐coding RNAs, all of which control constitutive or inducible gene transcription. This plays a key role in harnessing the transcriptional programs of both innate and adaptive immune cells due to its plasticity and environmental‐driven nature, piloting myeloid and lymphoid cell fate decisions with no change in their genomic sequence. In particular, epigenetic marks at the site of lineage‐specific transcription factors and maintenance of cell type‐specific epigenetic modifications, referred to as ‘epigenetic memory’, dictate cell differentiation, cytokine production and functional capacity following repeated antigenic exposure in memory T cells. Moreover, metabolic and epigenetic reprogramming occurring during a primary innate immune response leads to enhanced responses to secondary challenges, a phenomenon known as ‘trained immunity’. Here, we discuss how stable and dynamic epigenetic states control immune cell identity and plasticity in physiological and pathological conditions. Dissecting the regulatory circuits of cell fate determination and maintenance is of paramount importance for understanding the delicate balance between immune cell activation and tolerance, in healthy conditions and in autoimmune diseases.