Tile is usually installed where is high traffic and wear areas such as foyers, bathrooms and kitchens. Grout used between tiles is a mixture of Portland cement, color, and sand and not properly maintained by sealing and cleaning grout will become discolored and full of mold and mildew. If not sealed, even mopping the floor will cause discoloration to the unsealed grout. When mopping, your tile grout (which has a rough and porous surface) basically cleans the dirty mop by allowing the dirt in the mop water to fill in the tiny holes.
However, even sealed grout becomes dingy looking and needs to be whitening from time to time. But, by scrubbing too much you may damage your tile thus instead of rectifying your grout problem you will be increasing the problem.
1/ The best way to clean it is to use liquid extraction to loosen the dirt from the grout and use a wet/dry vacuum to pull the dirt back up and out of the little holes of the porous grout. Seal the grout with a very good (and likely expensive) grout sealer.
2/ If the color of the grout is white then using hydrogen peroxide along with baking soda is advisable.
3/ If the color of your grout is darker or has turned yellowish that means you will need a stronger cleaning agent and for this you can always make use of oxygen bleach which comes in a powdered form.
4/ For discolored grout you can use a grout cleaning tool that you can buy for a few dollars at a Home Depot. The head of it is a triangle shaped device. You just run it up and down your grout line, scraping off the old, discolored grout.
5/ For mildew use rubbing alcohol which will kill mildew.
6/ Whitening tile grout with a coke?! Coca-Cola has many uses that go far beyond a refreshing beverage.It actually has some unique cleaning properties. The acid content along with the carbonation makes great cleaner for tile grout. Allow the coke to saturate the tile grout for about 15 to 20 minutes. After the soaking, rinse the coca-cola clean from the surface.