We are all born with an amazing immune system that is fully capable of staving off infections. You see every major and minor virus or disease - from the common cold t the flu to deadly diseases like Ebola - is ultimately a disease of the immune system. The healthier your system the less susceptible your body will be when exposed to invading organism.
It's really as simple as the foods we consume, the rest you take, and the exercise you incorporate into your life along with a number of common sense personal hygiene habits you should employ. Stress management plays a role as well. The bottom line is you are either building health, or fueling disease. If you invest in building your immune system up you will be miles ahead when pollutants, disease, viruses or other pathogens seek to infiltrate and compromise your immune system.
First, think about the foods we eat. They fall into two categories; "protective" foods or "deficit" foods. Protective foods include leafy greens, vegetables, legumes, and citrus fruits. Deficit foods are junk food, fast food and highly processed foods. I suggest avoiding processed meats especially like lunch meat, bologna hot dogs and SPAM. Any meats containing nitrites.
In addition to the protective foods I strongly recommend adding vitamins and nutrient supplements to your diet as well. Here is the basics to incorporate into your health regimen.
Omega - 3s - purified fish oils.
Vitamin C - (ascorbic acid) 1 gram a day
Vitamin A - Cod Liver Oil is a good source
Vitamin D - egg yolk, fish like sockeye salmon
Vitamin E - eggs, liver and dark green vegetables, peanuts
Coenzyme Q-10 - pork, chicken, and beef
Beta and alpha carotene
Vitamin B6, B12