A dull mower blade doesn't cut grass blades— it tears them, leaving the grass vulnerable to disease or damage from the sun. How often the mower blade needs sharpening depends on the size of your lawn and how often you mow, but plan on doing the job at least every 4 - 6 weeks.
Instead of bothering with sharpening, especially one that's badly nicked or very dull, it's better to have it professionally sharpened-- or simply to replace it with a new one of comparable size.
Drain the gas, or wait till you run out. Disconnect the spark plug wire so the motor doesn't turn over while you're working.
Tilt the mower onto its side. Use a scraper or putty knife, clean off built-up debris from the underside of the mower deck.
Wedge a block of wood between the blade and the underneath side of the mower deck to keep the blade from turning. Using an adjustable wrench, remove the bolt or nut from the center of the blade. Keep track of the washer sequence for re-assembling
Pull off the blade and clamp it in a bench vise securely.
Most lawn mower blades are only sharpened on the outer 3" or so on each end. Check these blade edges for small nicks, and remove them using a flat medium file, holding the file at the same angle as the bevel. Sharpen the blade by moving the file toward the cutting edge with smooth, even strokes.
Make the same number of strokes on each end of the blade. Take substantially more metal off one side than the other and the blade will be out of balance. An out-of-balance blade cuts unevenly, makes the mower vibrate, and can cause serious damage to the engine.
Test the balance by resting the blade on a dowel or the handle of a screwdriver. If one side points up, sharpen the other until the blade lies flat. (Or use a blade balancer, available at garden centers and hardware stores.)