First, drain the gas or remove the gas tank. If you will be filing steel, you get sparks. Sparks are not the greatest thing to have around gasoline vapor. Enough said. Disconnect the spark plug wire and tie it safely away from the spark plug or remove the spark plug entirely. Turn the mower on its side.
CAUTION: Immediately check for oil leaks at the oil filler pipe or elsewhere. If there are any, you will need to work on the mower just propped up by 45 degrees or so. Or, use this as a good excuse to perform an oil change and drain the oil (even if the engine is cold, most of the oil will drain out but it will take a little longer). Just don't forget to refill the crankcase with fresh oil once you have completed work on the blade!
Check that the blade isn't bent. Locate a reference point on one side and note the height of the blade tip at that location. Rotate the blade 180 degrees and check the height of the opposite blade tip. There should be no significant difference - say no more than 1/8" or so. If it is greater, the blade is bent or the crankshaft is bent. Either will require further investigation as running the mower under such conditions will probably result in excessive vibration and can be dangerous.
Assuming this is fine, inspect the blade:
Slight nicks and dents can be cleaned up with a file while the blade is still installed on the mower. Unless you have run into a curb, this is probably all that is needed on an occasional basis. Removing this small amount of metal will also not unbalance the blade enough to worry about. Refer to the section: Non-violent blade removal if it needs to come off the mower.
If the damage is severe, consider replacing the blade entirely - they are not that expensive (usually under $10). Otherwise, you can use a file, a bench grinding wheel, or a grinding wheel mounted in an electric drill (there are special attachments for this specific application).
Since the rotating blade also contributes to the proper air flow, you do not want to upset the shape. Grind in such a way that the original blade angle is preserved. It doesn't need (or want) to be razor sharp. A 1/64" edge is fine. Anything finer will quickly be dulled by little bits of stone and dirt in any case. Safety is not the main concern here - if any part of your anatomy contacts the whirling blade, you WILL be in trouble no matter how dull or sharp the blade might be!
Attempt to remove approximately equal amounts of metal from both ends and in roughly similar areas if possible. If there are a few large nicks, it isn't necessary to remove them completely - your lawn (and neighbors) will never know the difference.
Check the balance by positioning the blade at the center hole location on a pencil or other rod - you don't need a fancy blade balancer but can use one if you like. If it tips one way or the other, remove more material from the heavy side a little at a time.
Replace the blade along with all its mounting hardware. Make sure you get all parts in the same relationship as they had originally. The blade must have its sharpened edges pointing downward. Don't forget the install the key if it is separate and DO NOT substitute a hard steel key for the soft metal one that should be used. See the section: Why soft metal keys must be used. If the locking key or blade adapter key appear damaged in any way, replace it.