The immune system is the white blood cells

The red blood cells carry oxygen, white blood cells fight off any material they do not recognize.

https://en.wikipedia.org/wiki/White_blood_cell

Note that white blood cells aren't smart about what they attempt to fight off: they'll try to kill anything that they're not used to seeing around. This is why we can't all give blood to each other and keep each other alive.