The immune system has three lines of defense to protect the body from pathogens. The first line of defense includes barriers like skin, while the second line contains white blood cells. The third line uses antigens and antibodies. The immune system interacts with the respiratory and digestive systems to help remove pathogens through coughing, sneezing, vomiting or diarrhea. It also works to maintain homeostasis by destroying pathogens and preventing disease.