Methotrexate is a medication widely used in pediatrics to treat various conditions including juvenile idiopathic arthritis (JIA), certain types of cancer, and autoimmune diseases. It acts as a disease-modifying antirheumatic drug (DMARD) and an immunosuppressant.