To start, allow the lawn mower engine to cool down before checking the air filter. You should also disconnect the spark plug wire before working on the engine for safety.
Rinse the foam with water from a garden hose or a bucket, adding a little dishwashing soap to remove grease. Then, intermittently squeeze the foam until it looks clean.
Wring excess liquid before wrapping and squeezing it in paper towels to soak up the remaining water. Allow it to dry fully in the sun for an hour before returning it to the mower.
If any accordion folds are wet, have holes, or splits, replace the filter. If you believe it is usable, gently shake it or tap it against a hard object to loosen any solid debris.
You also can blow on it to loosen unwanted particles or use a hand wand on a vacuum cleaner to pull dust and debris from the paper filter's accordion folds.
If the paper filter looks greasy or has caked dust, cleaning probably won't improve the filter's performance. You'll have better luck buying a new filter.