Although it is always good to know to how to get rid of those hard spot, the best thing to always try do is to prevent there from being any major porblems in the first place. Prevention is better than cure, so make sure to sweep your tiled floor every second or third day, this would stop dirt from staining the tile by constantly being stood on. Also sweeping will pick up any stones or pebbles that could scratch your tiled floor. Vaccuming is also a good idea to make life easier.
When choosing your detergent it is important to make sure that you do not use a harsh one that could damage your tiles, on top of this also make sure that you dont use a mop that could damage your tiles. So recommended would be any mild detergent, and dont use a sponge mop, this is because these types of mops usuaully just push the diry water into the grout marks instead of absorbing it.
The first thing to look at when you see a stain is to look at the colouration of the stain, this will help you choose how to approach the stain and what chemicals to use. Once you have identified the stain and found the best way to clean it, you well need to dry it properly.