From the article,
There are a couple of reasons why exercise is beneficial for our immune system. The first may be partly explained by the hormones that are released when we exercise. These are called catecholamines – which people may better know as adrenaline and noradrenaline. These hormones play an important role in the functioning of our immune system by eliciting the quick release of important immune cells that help detect the presence of viruses or other pathogens in the body. They also increase the amount of movement of our immune cells between the blood and tissue – which is important in helping immune cells detect and prevent illnesses caused by viruses or other pathogens. Research shows that exercise is one way we can increase the levels of these important hormones in our body.