The human adaptive immune system recognizes almost all the pathogens that we encounter and all the tumor antigens that may arise during our lifetime. Primary immunodeficiencies affecting lymphocyte development or function therefore lead to severe infections and tumor susceptibility. Furthermore, the fact that autoimmunity is a frequent feature of primary immunodeficiencies reveals a third function of the adaptive immune system: its self-regulation. Indeed, the generation of a broad repertoire of antigen receptors (via a unique strategy of random somatic rearrangements of gene segments in T cell and B cell receptor loci) inevitably creates receptors with specificity for self-antigens and thus leads to the presence of autoreactive lymphocytes. There are many different mechanisms for controlling the emergence or action of autoreactive lymphocytes, including clonal deletion in the primary lymphoid organs, receptor editing, anergy, suppression of effector lymphocytes by regulatory lymphocytes, and programmed cell death. Here, we review the genetic defects affecting lymphocyte apoptosis and that are associated with lymphoproliferation and autoimmunity, together with the role of somatic mutations and their potential involvement in more common autoimmune diseases.