If your pool water is black then this is an extreme case of algae. A large dose of chlorine and acid will be required. Use less in fibreglass and vinyl pools, as they can stain easily. If you have black spots on the walls then this is another form of algae known as black spot. It is often caused by a high pH (your pool needs acid). It is hard to remove. The pH has to be kept at about 7.0 and the pool broomed regularly for about 2 weeks. An algaecide like Tropiclear or LoChlor will help this process.
In older pools a stain can occur that will turn the floor or walls black in colour. This not an algae – to check run your hand or foot over a section of black. If it is slimy and smooth you have algae, if it is rough and cannot be moved by brush it is a stain. Black staining can occur from excessive copper levels, which is predominant in older marblesheen pools. Whenever a black stain appears add a few litres of acid to the pool to bring the pH back down to just above 7.0. The stain should disappear. If any remains after 24 hours a stain remover for metals will remove the rest.