In a fair fight between the immune system and cancer, the immune system would win most of the time. But cancer doesn't fight fair – it uses a range of underhanded tricks to gain the upper hand. To promote its own growth, cancer creates its own microenvironment around it to sap nutrients and weaken the immune response in the area.
One of the most devious ways it does this is by hijacking the function of immune cells called regulatory T cells (Tregs). Normally these cells play an important role in keeping the immune system from attacking the body's own cells, which would lead to autoimmune diseases. But some types of cancer will selectively let Tregs into their microenvironment, where they then fight off other immune cells that come to kill the tumor.