In general: the smaller and steeper the stream the better. The two main things you don't want to have upstream from your drinking spot are still water, which is a breeding ground for insects and insect borne diseases, and feces, which can be dropped anywhere but is less likely to be present the smaller the creek is.
If you can follow a stream to its source coming out of a mountainside you're golden, this water was filtered by the soil and is usually very clean. But you have to try and be realistic in looking for it. Going uphill costs a lot of energy. And when you're lost and looking for civilization in particular you often want to be heading down to the valley.
Rain water is also very clean, clouds are relatively bacterium free. The problem with rain is collecting it. Even in the wettest of torrents leaving a glass out for a day nets you just one glass of water. Normal rainfall is more like a few millimeters to a few centimeters. You'll have to use tarps and such to collect rainfall from as large an area as possible.
Snow and even glacier ice are often relatively unsoiled as well, being rain water that has been sitting on the ground surrounded by itself. But you want to melt and drink it rather than eating it, that will cost you too much body heat. In very cold conditions melting can be tricky, requiring fire or alternatively a shelter being warmed by body heat and lots of patience.
In some places you can dig for water, most notably the deepest parts of dry riverbeds and the lowest points of dune landscapes near the sea. (Not on the beach, the ground water is salt there.) How clean it is depends on local conditions. While this water has been somewhat filtered by the soil it also sits relatively still in a place where gravity slowly collects pollution and such. The more deserted the landscape the better.
And then there is the possibility to go for a dirty water source, or even green leaves, and making drinking water using a solar still. Describing how to make one is a bit out of scope for this answer, but it's relatively easy provided you have some form of a clear plastic sheet available and the sun shines. The amount of water it brings you is pretty small though, and especially when you're on the move a readily drinkable source is preferable. There's also the option to build a filter by taking something like a bucket, making a small hole in the bottom and filling it with layers of sand, rocks and if you have it charcoal (from your campfire). It's not as good as the dozens of meters of clean soil on top of a natural spring, and it's not as clean as a solar still, but it's something, and it's relatively fast.