Washing a foam pad can be a bit awkward and time consuming, but it can be done. NEVER put foam in a washer. The spinning and agitation is too much for the delicate structure of the foam and you will end up with hundreds of little pieces. The pads should also never be put in a dryer - high heat is also bad.
Now that you know what not to do, here is how to clean the pad. Begin by vacuuming the pad well on both sides. If you have specific stains, treat them with an enzyme-based pretreater. Your manufacturer may have given you a special solution and, if so, use that for spot cleaning. Work in a circular motion from the outside of the stain to the inside to prevent spreading.
Depending on the size of your pad, you can wash it in your bathtub or on a plastic tarp outside. If you work outside, you will need to be near a water hose. Fill a spray bottle with one part liquid detergent to two parts water. Spray this over the surface and allow it to work for at least 45 minutes. You can also add oxygen-based bleach to the cleaning solution, which will help lighten stains.
After the detergent solution, use the hose or a hand-held shower head to rinse the surface. Try not to saturate the foam. Squeeze out excess water but do not wring the foam.
Allow the foam pad to dry flat for several days away from direct sunlight which can break down the foam. Turn the pad a couple of times each day to help it dry more evenly.
Specific questions? Just ask here.