A reaction of the body against a foreign substance.