A substance that causes the immune system to produce antibodies and recognize it as foreign to the body.