If you are going to have a swimming pool, you must have a filter system that collects all the debris that can accumulate in a pool. In most areas there are actually legal requirements as to how quickly the water in the pool must go through the filtering system. Depending on where you live and the size of the pool, the requirements vary from a certain minimum number of gallons per half hour, to all the water in the pool being changed within 6 hours. This is to ensure that all the water in the pool is kept clean - and safe --at all times.
There are usually two or more drains at the bottom of the pool, and skimmer drains around the side of the pool. These work to catch the various type of debris and to filter the water before it reaches the pump. The heavy debris falls to the bottom of the pool while the skimmer drains catch all the light dirt and debris, which float on the surface of the pool, in easily removed strainer baskets.
Right in front of the pump, there is another strainer basket to catch large debris. The water then flows into the filter box itself. Depending on the type of system, the filter unit may contain special fine sand particles to catch all the small debris. Other filters use a diatomaceous earth filter, which is comprised of a chemically inert powder made from sea organisms called diatoms. To clean these filters you need to reverse the water flow, or backwash it, letting the dirty water from the filter out into the sewer system. Another type of filter, made from corrugated paper or polyester cloth, just needs to be removed and washed off. Eventually, after a few years, you just dispose of it and replace it.