Immunosuppressants work by inhibiting the activity of the immune system, which can prevent the body from attacking its own tissues or rejecting foreign organs. They achieve this by targeting various components of the immune response, such as T cells, B cells, and cytokines.