Much as random choices from a restaurant menu can lead to meals with a huge number of variations, random combinations of components can lead, to trillions of different receptors. The human body therefore has at least a trillion ways of recognizing that something foreign has invaded. How the Immune System Detects Invaders by Philippa Marrack. The immune system recognizes invaders in a complex way. The two lymphocyte groups use different strategies.
B cells can attack the intruder directly.
T cells require assistance from B cells or other white blood cells that ingest and digest foreign invaders. Protein fragments from the processed invader reappear on the surface of these cells, bound in specialized grooves of a complex of proteins. The T cell receptors recognize the bound protein complex and initiate a cascade of events, enlisting the B cell army as well as other T cells. This system allows lymphocytes to identify and destroy cells in which viruses or bacteria are hidden and multiplying. How the Host Avoids 'Friendly Fire' by John W. Kappler.