Use the Boundary Flag Bundle to help your pet understand their boundaries with visual cues. It is recommended that as part of your pet's initial training, flags be placed 10 feet apart.
Between about 15 to 30 days, monitor your pet until you believe he/she understands the set boundaries. At this point, remove every other flag every 4 days until all the flags are removed. This training process should complete in about a month, leaving your lawn flag free and your pet contained within your set boundaries.