The study of the immune system and its response to various pathogens, including bacteria, viruses, fungi, and parasites.