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.
Crow MK. The innate and adaptive immune system. In: Goldman L, Cooney KA, eds. Goldman-Cecil Medicine. 27th ed. Philadelphia, PA: Elsevier; 2024:chap 35.