Firstly decide upon the type of grout required when replacing old grouting (see Grouting for further details).
Use a pointed tool to scrape out the old grout. Clean the area with a damp
cloth and check the area looks evenly de-grouted. Use a plastic scraper or
a rubber-bladed squeegee to push the fresh grout between the gaps in the
tiles.
Make sure all the spaces are evenly filled and then wipe the grout
off the tile surface before it dries. Use a blunt edge of a stick or tool
carefully, to smooth the surface of the grout in the gaps - but do not 'dig
down' into the grout.