An antigen is any substance that causes your immune system to produce antibodies against it. This means your immune system does not recognize the substance, and is trying to fight it off.
An antigen may be a substance from the environment, such as chemicals, bacteria, viruses, or pollen. An antigen may also form inside the body.
Craft J. The adaptive immune system. In: Goldman L, Schafer AI, eds. Goldman-Cecil Medicine. 25th ed. Philadelphia, PA: Elsevier Saunders; 2016:chap 46.