Assuming you are talking about floor mats made of rubber, the best way to clean them is with a mild soap and water. You can also use a commercial cleaner specifically designed for rubber. Just be sure to read the label and make sure it is safe for the type of rubber your mats are made of.
If you have mats that are especially dirty or greasy, you may need to pre-treat them with a solvent-based cleaner before washing. Once they are clean, be sure to rinse thoroughly with water to remove any residue from the cleaners.
To prevent your mats from getting too dirty or grimy in the first place, try placing them in an area where people will not track in as much dirt and mud. You can also vacuum them regularly to help keep them clean.