Your immune system is really made up of two parts, the innate and adaptive immune systems, says Rita Kachru, MD, assistant Professor of clinical immunology and allergy at the David Geffen School of Medicine at UCLA. The innate immune system is your body's first line of defence, and is made up of your skin, white blood cells, and other substances in your blood. If your innate immune system isn't able to kick a pathogen, then your adaptive immune system (which is composed of defence cells and antibodies) jumps in to fight it.
There are tons of complex factors that contribute to the strength of a person's immune system, and genetics play a big part, says Andrew Murphy, MD, an allergist and immunologist in Delaware County, PA. Broadly speaking, there isn't sufficient data that supports the idea that you can "boost" the immune system you were born with through lifestyle changes alone, according to Dr. Murphy.
That said, adopting certain healthy habits can help your adaptive immune system do its job if and when you get sick, Dr. Kachru says. While these habits definitely can't cure an infection or replace medication, they may give your immune system a leg up.