Don work gloves and safety glasses. Remove cracked or crumbly mortar with a chisel and a ball-peen hammer. Brush away any dust or small pieces with a stiff brush. The remaining mortar must be solid and in good condition.
Don a face mask. Fill a disposable container with some grout mix; try to estimate about how much you think will fill the damaged area. Add water and stir. The instructions on the grout indicates the best ratio of water to mix. The grout should be smooth but not runny or liquid, and should not feel dry or crumbly.
Fill a mortar bag or similar plastic bag with the grout and cut off the tip, squeezing the grout out through the bag and into the damaged area. The principle is similar to using an icing bag to ice a cake.
Scrape off excess grout from the flagstones with the trowel or wipe with a rough piece of cloth. Wait about 15 minutes or until the grout has had time to set, then smooth out the new grout lines so they are flush with the old grout.
Dampen the repaired patch regularly over the course of about three days by misting it lightly with water. This helps the grout dry more slowly and creates a better bond with no cracks.