There is an common misconception that boiling sterilises water; it does not. Application of heat breaks down biologicals in the water. The higher the temperature, the greater amount of breakdown occurs. The longer you apply the heat, the more breaks down. This is why pasteurisation works, you apply about 70 degrees for about 10 minutes and you get the same effect as boiling for one (ish). Clearly, the initial concentration is important. The nature of the biological matters. Viruses are not as hard as bacteria which are not as hard as bacterial cysts. Still, even after this time, the water is not completely free of biologicals, but the level had been reduced below such a threshold that a healthy person's immune system can cope with it. This is why hospitals clean all their bits and bobs in autoclaves, where the temperature is higher than boiling water. They put them in there a long time to ensure they are sterile. This is because people's immune systems in hospitals are often compromised.
This information is sourced by me directly from the author of the chapter on water in the Royal Geographical Handbook of Expedition Medicine which recommends a rolling boil for five minutes. This time was chosen for two reasons. The first being that it's a safe bet for those who can't identify a rolling boil and the second being that the book is aimed at all environments including altitude. With an increase in altitude, there is a drop in the boiling temperature of water, and thus a need for more time to achieve the same result. In addition people don't always time with a watch and 5 minutes accounts for guessing.
You must try to filter your water before boiling for two reasons. The first is that impurities in water can (but don't always) make it look like water is boiling when it's not and the second is that particles can insulate the biological from the heat both meaning that more time us required to boil and given that was don't know the specific effects, we can't predict how much more time we'll need. In addition, filtering with a millbanks will actually get rid of Guardia, it being so "big". The alternative is to over compensate and boil for 10 to 15 minutes depending on altitude. This may be a problem if fuel is scarce, so another alternative is to bring it to the boil and leave covered off the heat for 10 minutes (if filtered). This information is sourced from the CDC and WHO.
I hope that clears things up.
My advice is to filter it and then boil it for a minute. If, however, you suspect a chemical contaminant then boiling (which ultimately makes it lose volume) will only serve to increase the chemical concentration. The only thing you do in the field for that is to distil it, unless you are possession of a reverse osmosis pump.