In this case, it seems that the water comes from the water mains, so it should be safe, and it seems that it is also checked at that point.
The non-drinkable water in nearby busy places (villages/towns) is well labelled ("Non potabile"), or just has a safety sign "Non controllata" (not checked). Note: sometimes that is just to incentivize people to go into the nearby bar.
The rest of the question is more tricky, when there is no sign (or the sign "has seen several wars", i.e. it is very old so probably outdated): it depends. Mainly we also drink from such fountains. On mountains/hills they may not come from water mains, nor be controlled, but usually it is safe: they existed to provide drinking water. I just may not use them after heavy rains, or in very dry periods; those are the times that contamination may happen (from livestock). I also avoid them if the water is not constantly flowing in remote areas (or in winter, when only a few people are using it), or if it is visually not nice (e.g. a very rusty faucet).
Often it is fine and also very good water. And on mountains you may notice a door on the hillside (or a small building) nearby: it is a chamber of the village aqueduct (e.g. to compensate pressure, and to flush extra water), so that means the water is good quality.