Immunity is the body's defense mechanism against pathogens such as viruses, bacteria, and other harmful microorganisms. It consists of various components that work together to protect the body from infections and diseases. There are two main types of immunity: innate immunity and adaptive immunity. Learn how these help your body defend against the pathogens you encounter regularly.