Do vitamins (taken as pills) boost your immune system, and make you less likely to contract diseases such as common cold or flu?
There are two answers to your question, "emphatically yes" and "sort of." Vitamins play a critical role in immune function, and a deficiency of certain vitamins can lead to a higher risk of developing an infection. Specifically, vitamin A, B2, B6, C, D, and E deficiency are linked to depressed immune function. However that is deficiency, not supplementation above what most people need.
There's a popular idea that megadosing with vitamins, usually vitamin C, lowers the risk or length of common upper respiratory infections (eg the common cold). The evidence on that is much less convincing. A metanalysis of studies finds weak or no evidence that it is effective, but may be associated with a small effect. More study is recommended by the researchers, but they don't go as far as recommending large doses of vitamin C. (It is also worth noting that large doses of fat soluble vitamins, A, D, E, and K, can be quite toxic and should be avoided).
The magnitude of the first effect is quite large: people with a vitamin deficiency certainly have a depressed immune system. However it is not clear that larger doses are helpful.