Study of how the body resists infection and certain other diseases. Knowledge gained in this field is important to cancer treatments based on the principles of immunology.