The best way according to him is to make a good fence. The poem's final lines says that good fences make good neighbors. That can mean that if you stick your nose in your yard you will have good neighbors. Of course, this is all figuratively and refers to much greater things in life.