The immune system has the tremendous task of recognizing and eliminating a practically unlimited number of foreign and often harmful substances. To reach that goal, it has evolved as an apparatus generating a vast array of different antigen receptors expressed by T and B lymphocytes. Through these receptors, the cells can recognize, and respond to, foreign structures; nevertheless, the lymphocytes do not normally react to the body's own constituents. The processes that safeguard a sufficiently broad diversity and yet prevent potentially pathogenic autoimmune reactivity are only now beginning to be elucidated. We describe some of the mechanisms that are believed to play a major role in the generation of the B lymphocyte and antibody repertoire, the induction of tolerance against autologous components and the production of pathogenic autoantibodies, once tolerance is broken.