In Western Europe, much of Eastern Europe, and other developed countries you can drink the water safely from public water supplies. While some hard travelers adjust to impure water over weeks or months, most travelers avoid discomfort by buying most or all of their water. Note that ice cubes in developing countries are often not made from purified water, and that they bite even from alcoholic drinks. Buying water is usually easy. Look for a quality label and a safety-sealed cap.
Bottled drinks are also safe and routinely drunk by travelers.
Boiling makes tea, coffee, and soups safe in developing countries. Opinion varies on how much boiling is necessary, but a minute or two at full boil should do the job. Iodine is the preferred chemical treatment for water. It is easy and effective in twenty minutes, but iodine probably should not be relied on for months at a time. It also should not be used by pregnant women and people with thyroid conditions.