Grass is both easy to grow and difficult to eradicate. Grass spreads by rhizomes, underground runners that creep horizontally before they emerge from the soil. The rhizomes can set root and create new shoots, starting a new plant independent of the original rhizome. Grass also spreads by seed, transported by wind, in new soil and even on the bottom of shoes. Some grasses, such as crabgrass and quack grass, are invasive, while others are confined more easily.
To prevent grass from creeping into the flowerbed, the barrier has to be at least 4 inches deep; 5 inches is better, especially if there are invasive grasses, such as crabgrass. Avoid materials that deteriorate, such as wood. The best results come from landscape fabric placed under the edging, slightly up the soil on the lawn side and extending to the garden-bed side. The edging should be flush with the lawn for mowing.
Poly lawn edging is designed for the purpose of separating lawn from flowerbeds and is cost-effective. Professional- or commercial-grade edging is the most durable and has adequate depth. The flexible edging can be used for curved layouts; some poly edging products can be installed at right angles as well. There is also an effective, but expensive, galvanized-steel lawn edging on the market that can curve and bend into right angles.
The most impenetrable barrier is concrete, but it's also costly and permanent. Plan the garden so that it's bounded by structures like a sidewalk, curb or patio to minimize conflict with grass. Concrete curbs should be set at grade for a mowing edge. Bricks, paving stone and precast concrete blocks are effective edgings, but should be installed correctly, including landscape fabric on 3 sides. Placed flush with the grade, they they blend with most landscapes.