The study of microorganisms, including bacteria, viruses, fungi, and parasites, that cause infections.