In general, surface waters such as streams and lakes are more likely to contain disease-causing organisms than groundwater.
Deep wells are safer than shallow wells.
In fact, shallow dug wells are often as contaminated as lakes or streams. A full boil for at least one minute is recommended. This is not appropriate for water that is obviously heavily polluted, or subject to chemical contamination. To remove the flat taste of boiled water, leave the boiled water in a clean covered container for a few hours or pour the cooled boiled water back and forth from one clean container to another. Disinfection using bleach works best with warm water.