The immune system defends the body against infections and certain other diseases.