The short answer is, by hand. The best way to wash them is in a hand-basin using tepid to hot water with laundry detergent. This apparently deteriorates the wall of the virus. Once washed, rinse and leave to dry in direct sunlight. The UV light from reading, also destroys the virus. Once dry, use a warm iron to re-pleat the mask and you are ready to go. Some are saying you need to wash the mask every day. I do not. I rotate my masks regularly (which is why I advoate buying our family pack) and I wait until I have used it a few times before I wash it. As I rotate them I leave them in direct sunlight so I always have a mask or two that have spent the day in the sun. Then I come back to them and wash them all together in one go save one mask. To me, this is common sense. But since we are in unchartered waters, I highly recommend you do your own reading and keep up to date with what is being published in online journals.
On a lighter note, the mask, if you fold it in half, and push the string elastic to the base of the breast pocket, allows the pleats to spring up and makes for quite a cool pochette. I will post an image I took yesterday.