Azathioprine is an immunosuppressive medication primarily used to prevent organ rejection in transplant patients and to treat autoimmune conditions such as rheumatoid arthritis, lupus, and inflammatory bowel disease. It works by inhibiting the proliferation of immune cells, thereby reducing the immune response.