It depends entirely on the type of mat and the material it is made from. If the manufacturer has cleaning suggestions, either on the product or the manufacturer website, I would follow those instructions. Some materials are incompatible with certain types of cleaners.
I used to wash my old Tapas brand yoga mat in a side-loading washing machine with a bit of Dr. Bronner’s liquid soap, and then hang it to dry. This would be completely inappropriate for a mat made from natural rubber or containing jute (as the mat is more likely to shred, and the jute could come loose or remain so soaked that it grew mold).
My current yoga mat is a Prana Revolution mat. For light cleaning, I use a mat spray such as Changing Poses or NAMA Hand and Mat Sanitizer in combination with a washcloth. For heavier cleaning (which I do less frequently) I use a sponge, water, and a gentle cleaner such as Dr. Bronner’s liquid soap or Simple Green. Because some of the cleaner may remain on my mat no matter how much I wash it, I select cleaning products that are safe to touch my skin.
In one of the yoga studios where I used to take classes, each student was expected to clean his/her mat after class (that includes the studio loaner mats). The studio provided spray bottles containing water, rubbing alcohol, and a tiny amount of tea tree oil and designated washcloths. Freshly cleaned studio mats were hung in a separate area, making it clear which were still wet.