Q. If a shirt gets a bad stain on it are you allowed to wash it on chol hamoed?

A. Shulchan Aruch (O.H. 534:1) rules that it is forbidden to launder clothing, on Chol HaMoed. Our sages prohibited laundering so that people would prepare properly before the holiday and engage during the festivals in the appropriate joy of Yom Tov (Moed Katan 14a, see Mishna Berura ibid.) If he only has one single shirt Poskim permit washing it (Shone Halochos p. 56)
However Igros Moshe (O.H. 5:36) permits just removing a stain, as this is not considered laundering for Chol HaMoed purposes (It would be prohibited on Shabbos or Yom Tov). Similar lenient opinions are held by other Poskim (Chol HaMoed Kehilchosoi 5: n.86, quoting R’ Menashe Klein zt”l and R’ Shmuel Halevi Wosner zt”l, Beer Moshe 7: 33, Yalkut Yosef p. 149, et. al.)
Horav Shlomo Miller’s Shlit”a opinion is similar and permits on Chol HaMoed even the laundering of hard to remove stains as long as the stains occurred during Yom Tov, Chol HaMoed or Shabbos Erev Yom Tov, but not before and not washing the entire shirt.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a