Welcome to Swim A Lot!
Safety Fence
In many places, local zoning will require a safety fence to be erected around your swimming pool. Fences can be made from many different types of materials. If you have an above ground pool, there are special pvc fences made that will attach directly to your pool. It does give a nice finished look to your pool, and is a lot cheaper than constructing a large wooden or metal fence around the entire perimeter of your back yard.
The whole idea behind safety fences, is safety, of course. No one wants to have an accidental drowning in their pool. Kids tend to get into just about anything and this is one way to protect them and keep them out of the pool area. There are many different types of fencing available, so shop around and compare pricing to find one that will look best for your swimming pool.
I have an above ground pool and was required to have a 5' fence around it. I compared the price of an add-on safety fence to that of a wooded fence and the cost of each were from one extreme to the other. I opted to purchase the bolt on fence. For my 24' round pool, it cost almost $500 and took about two hours to put it on myself. It does have a nice look and as a side benefit, it helps keep pool toys such as beach balls inside the pool.