Methotrexate is used to treat various conditions, including certain types of cancer, severe psoriasis, and rheumatoid arthritis. It works by interfering with the growth of cells, particularly those that reproduce quickly, like cancer cells and cells involved in inflammation.