You can breath under water indefinitely. The water does not have to be totally pure, but it must be actual water, not just any liquid. Any poisons or toxins in the water travel into your bloodstream instantly, as if you had swallowed them.
You must breath water most of the time. You can survive outside of the water for a number of hours equal to your Constitution modifier, but after that, you must spend an equal number of hours breathing water. Otherwise, you start to suffer from asphyxiation.