Immunomodulators work by modulating various components of the immune system, such as T-cells, B-cells, and natural killer cells. For instance, they can enhance the activity of T-cells to recognize and attack cancer cells. Some immunomodulators also inhibit the mechanisms that cancer cells use to escape the immune system.