If you happened to forget that cast iron caldron on your hike into the woods, use the hot rock and animal hide method you have read about in other articles. Just get the water to a rolling boil for 5 minutes, more or less. More at higher altitudes, because water boils at a lower temperature up there, so add one minute boiling time for every 1,000 feet above sea level. Other methods of treating water require some special equipment and supplies. There are lots of filters designed to remove bacteria and parasites.
Iodine tablets are a good method also.
These iodine tablets are found in backpacking stores and magazines. Follow the directions and let the water sit for 30 minutes before drinking. Iodine will kill viruses, but the filter methods may miss these extremely small particles. You can too, but you have to carry this bottle of caustic liquid with an eye dropper in your back pack. Add 2-3 drops of household bleach per quart and let the water sit for 30 minutes.