From the point of view of an immunologist, the body can be considered as a large community of cells all working together to keep the system functioning. Some cells have jobs that keep them in the same place all the time; nerve cells, for instance. Other cells, such as blood cells, are constantly on the move, carrying nutrients, and taking away waste. Some cells, such as brain cells, are very long-lived, while other cells, such as skin cells, have a relatively short life.
But, like many communities, the body is not very tolerant of strangers. But in the case of the body, this intolerance is well justified. Most cells which enter the body are malign in intention - that is to say, they have entered the body to do things which might damage or even destroy it. As a result, our bodies keep guard on their frontiers. Our skin is a secure envelope which prevents bacteria entering, and our noses and lungs are protected by small hairs and mucus which trap and later expel invaders.
However, the war between the body and invading cells has been going on for millions of years. Over that time the invaders have developed some clever tricks for getting past the body's frontier defenses. Some, like the cold virus have developed the ability to travel through the air in little droplets of water. Other diseases, like malaria, travel through smaller animals and use these to gain entry to our systems. And of course, any injury that breaks the skin invites millions of bacteria through this gap in our defenses.
So the body has to develop more than passive defenses to keep viruses, bacteria, and parasites out. This defense system is called the immune system. If the cells in a body are the community, then the cells of the immune system are the policemen. Their job is to hunt for invaders which have penetrated the first barriers to entry, and when these invaders are found, the immune system will try to kill them. The immune system does its job very well on the whole, which is why you are alive now to be reading this.