Filter not keeping up
The most common cause. High pressure, weak returns or a pump running only a few hours a day. Clean the filter and run the pump eight to ten hours in summer.
Low chlorine
Cloudiness that appears after a hot weekend or a party is usually the first stage of an algae bloom. Test, shock, brush, filter.
High pH or calcium
A milky haze with scale on the tile line means calcium is coming out of solution. Lower pH and alkalinity; in extreme cases partial water replacement.
Fine debris
Pollen, dust from construction, or dead algae after a treatment. A clarifier helps the filter catch particles; a flocculant drops them to the floor to vacuum to waste.
Early algae
If the water is cloudy with a green tint and the walls feel slick, treat it as algae now; waiting a week turns it into a green pool.
Questions
Is cloudy water safe to swim in?
Not if you cannot see the main drain; that is a safety rule at public pools for a reason. Clear it first.
How fast can it be fixed?
Filter and chemistry causes clear in a day or two. Algae takes about three days.