Open any windows to ventilate the area, and put on a pair of rubber gloves to protect your skin.
Mix 3/4 cup of chlorine bleach with 1 gallon of warm water in a bucket. Apply the bleach mixture to the grout with an old toothbrush or grout brush. Allow the bleach to sit for five to 10 minutes, then scrub the grout thoroughly with the brush. Rinse the grout thoroughly with water and allow it to dry completely before staining.
Apply painter's tape to protect the tiles next the grout lines. This isn't a required step, but it can prevent unglazed tiles from absorbing the grout stain and will give you a neater-looking job in cases where the grout stain is a different color from the tile.
Put on a clean pair of rubber gloves and prepare the grout stain according to the manufacturer's instructions.
Apply the grout stain carefully to the grout lines with a small, stiff-bristled paintbrush. Work on one grout line at a time, wiping away any excess stain with a damp sponge.
Allow the grout stain to dry according to the manufacturer's instructions and remove the painter's tape.
Apply a grout sealer if the stain you used doesn't contain it. Depending on the type of sealer you choose, you may spray it on or apply it directly to the grout lines with a built-in applicator.
Wipe up any excess sealer from the tile with a clean, damp sponge. Allow the grout sealer to dry according to the manufacturer's instructions, and apply a second coat if necessary.