It discoloration is what you are dealing with, we have an article dedicated to you.
If staining is the problem, read on.
Discoloration is when your grout takes on a blotchy look over time, often appearing as more gray than the original color. This occurs over time.
Staining is when pigmentation from other sources has spilled onto the grout, and the color has permanently changed. For example, a glass of wine spilled on the floor can often stain grout.
Since grout is porous, it can be cleaned much like we clean our laundry. Ideally, you'll want to use an alkaline cleaner instead of an acid based cleaner. Here is a great eHow article on alkaline and acid based cleaners.
There is also a very highly recommended article on remove-stain.com from folks in the tile community.
You can also find specialty cleaners designed specifically for tile and grout. These work like the stain treatment sprays you can buy for your laundry by attacking the stain more aggressively - like Shout or Spray N Wash does for that tomato stain on your shirt.
Most importantly, do NOT use an oil or wax based cleaner! This will end up causing you headaches later on, as these substances will actually cause MORE dirt to be attracted to the tile later on.
Once you have cleaned the tile and grout, use a wet/dry vacuum to suck up all the dirty water. Then rinse and vacuum this water up as well.
If you are unable to remove the stain yourself, check your local area for a tile/grout steam cleaner. These professionals use a very heavy blast of steam to remove the stain, and it is very effective. Sometimes these professionals will run specials on their cleaning services - take advantage of them!
Sealing the grout is your best defense against staining. We often find that people who hire J3 Services for tile work opt to NOT apply sealer at the end. We STRONGLY recommend that sealer is applied in almost every situation, in part due to this exact issue.
There are two main types of sealer that are available:
1. Penetrating Sealer - this chemically bonds with the grout.
2. Topical Sealer - This coats the surface of the grout, but will wear away over time.
As you have probably already guessed, the topical sealer is less expensive. However, there are aspects of using a topical sealer that you may not want to sign up. For example, the topical sealer will make the grout look more like plastic. (Not the most sophisticated look.) Also, it will eventually wear away over time.
The Penetrating Sealer, though more expensive, is much more durable and won't make your grout look like plastic. This Sealer actually bonds with the grout instead of laying on top of it. There are penetrating sealers that are designed to repel water and others that are designed to repel oil. Both are available on the general market.
In case you are wondering, J3 Services likes to use Aqua Mix brand sealers.