You can wash cleaning rags in the washing machine, generally in a separate load. If they are very dirty, you can add some vinegar in the fabric softener part of the cycle to remove any smell.
Two ways to wash cleaning rags. Put in washing machine on a hot water setting. Add detergent and bleach. The other options is to boil them on the stove for an hour having added detergent.