There are lots of different ways to create an edge. One of the easiest is to make a narrow trench between your border and your lawn. Then just run a hoe through the trench every week or two during the summer to keep it from filling up.
There's also a system where you dig a wide, deep trench at the edge of your bed and fill that with mulch. The grass in your bed will have a harder time growing into the mulch and it should slow its growth.
---Justin, Senior Garden Editor, BHG.com