Iron supplements are used to treat and prevent iron deficiency including iron deficiency anemia. For prevention, iron supplements are only recommended for those with poor absorption, heavy menstrual periods, pregnancy, hemodialysis, or a diet low in iron. Prevention may also be used in low birth weight babies. Iron supplements can be taken by mouth, injection into a vein, or injection into a muscle. While benefits may be seen in days, it can take months before iron levels return to normal.
There is debate amongst health care providers whether iron supplementation for elite athletes is necessary to prevent anemia. Here is an editorial that presents this controversy.
Paper: Sports anemia: facts or fiction? https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3417720/