If you boil water, you'll kill most pathogens living in it.
Dissolved chemicals or particulates will remain, so if you boil brown water it'll still be brown. If whatever is making the water brown happens to be a toxin drinking the boiled water is still inadvisable.
However, you can use boiling the water to clean it. Catch the steam, let it condense and have some clean water.
We don't do that generally because it's a rather arduous process and it consumes a lot of energy.
Boiling water doesn't "clean" it. It does, however, kill certain harmful bacteria, which results in water that is safer to ingest.
No, boiling water only kills living pathogens that can cause diseases. Anything dissolved or suspended in the water, eg. micro-plastics, salt, lead, bleach, will not be removed and will be left behind in a higher concentration after boiling. Water has to be **distilled** for it to be cleaned of other contaminants.
[Boiling water for potability](https://en.wikipedia.org/wiki/Boiling#For_making_water_potable)
In Pharmaceutical processing there's steam, and *sterile steam*. The two are not synonymous. You may have a processing system that is sanitized, generally free of microbial contamination and expected not to encourage growth to a reasonable limit. Things like shampoo, and lotion are made under sanitary conditions. Food is processed under a sanitary standard also.
However, take that steam up to 130C and filter at .2 micron to remove solids and now you have *Sterile Steam*. This is generally assumed to be statistically free of pathogens, although there's a large and ugly formula with exponents to predict just how free something is.
You can actually filter something to sterility also, and often this is the prefered method in pharmaceuticals. You may have a material that is heat sensitive, or not easily heat treated. You filter it through a 0.2 micron filter and it removes viruses, bacteria, and solid contaminants.
So if your goal is to clean water, the easiest way is to filter it. This will take suspended contaminants out. If your goal is to sterilize it, you need to heat it to 130C for at least 23 minutes and for good measure filter it (0.2 micron)before you heat it.
Purifying it is a different matter because different chemistry takes different steps. Things like RO and Ionic bed treatment will do most of it. But "pure" is a mater of specifying it also. There's a diffrence between 99.9% pure and 99.999%.
To be clear, boiling water doesn't clean it: it kills many disease causing bacteria. Their dead bacteria bodies are still in the water.
In fact, a large number of bacteria survive the heat just fine. Some "sporify" - basically go dormant until conditions don't suck as bad.
Any other contaminants will still be in the water. Heck, you'll probably add some from whatever container you used to boil the water.
There are some really fancy filters that can filter things down to the molecular scale. And of course, there is distilling (turning the water to vapor and then condensing it back to water). Neither of these processes will give you 100 percent pure water though.