One of the most common problems in swimming pools is algae. Algae in swimming pools can turn the water cloudy or green, also causing foul odours and sometimes (as in case with black algae) staining the pool’s walls and floor.
Algae is a plant that turns the sunlight and carbon dioxide into food which causes bacteria to grow and multiply rapidly. In swimming pools, the chlorine is used to fight algae and bacteria growth. Sometimes that raises the levels of pH in the water.
Like with battling any bacteria, preventing algae is better than treatment. Keeping free chlorine at adequate levels will help prevent algae from growing. General cleanliness of the pool is also important, as the build up of bacteria and organic matter contributes to algae growth.
Here is an article that explains how to eliminate and prevent green algae in swimming pool.