Odporność, system immunologiczny