How to Eat Healthy to Build the Immune System. Part of the series: Nutrition 101. In order to keep an immune system strong and prepared to resist infections, make sure to get enough sleep, to stay hydrated and to eat a well-rounded diet. Learn about the importance of fruits and vegetables for a healthy immune system with help from a registered and licensed dietitian in this free video on nutrition and the immune system.