Cut your lawn edge with an edging tool. Use it on the barrier between your lawn and the concrete of the sidewalk or driveway and at plant bed borders. Place the wheel of the edger on the concrete and position it so that the blade penetrates the grass roughly 1/2 inch away from the sidewalk. Then push the edger back and forth until you create a 1/2 inch gap between the driveway or sidewalk and the lawn. For garden beds without brick or paver borders, you may be better off simply using a sharp hoe or spade to slice along the edge of the garden and the lawn. Make the line as even as possible and parallel to the edge of your garden bed.
Trim the edge of the lawn with a line trimmer as it begins to grow out. Use the tool according to the manufacturer's instructions. As you cut, hold the trimmer so that the grass is thrown on the lawn instead of the concrete or garden.
Mow your lawn. Always trim before you mow. The lawnmower will pick up the grass clippings left behind by the lawn trimmer.