Avoid water with floating material, an odor or dark color. Use saltwater only if you distill it first. You should not drink floodwater. You should purify all water of uncertain purity before using it for drinking, food preparation or hygiene. There are many ways to purify water.
None is perfect.
Often the best solution is a combination of methods. Boiling and disinfecting are two methods which will kill most microbes in water. Distillation is a more thorough method as it removes the microbes that resist boiling and disinfecting. It also removes heavy metals, salts, and most other chemicals. Boiling is the safest method of purifying water.