Immunology is the medical specialty dedicated to understanding the structure, function, and regulation of the immune system.