Hi there, I feel as though I should include our standard disclaimer that the "medieval period" in Europe spans 1000 years and an entire continent, so the answer will vary at different times and in different places. That said, though, this question has been asked and answered here a few time.
This is not to discourage any further answers, but you may find this to be interesting reading:
How did people (esp. European townsmen) get fresh water in the Middle Ages? -- submitted 1 year ago, 8 comments
Clean water with in medieval times or further back? -- 2 years ago, 40 comments
How often did pre-modern peoples drink water as opposed to other drinks? -- 2 years ago, 18 comments
These are pulled from our FAQ, specifically the Health - Drinking Water section: https://www.reddit.com/r/AskHistorians/wiki/health#wiki_drinking_water
You may also be interested in the converse question which is often asked here, which deals with the myth that premodern people drank alcohol instead of water:
https://www.reddit.com/r/AskHistorians/wiki/health#wiki_fetal_alcohol_syndrome
If, in reading through those threads, you see interesting information, just ask the question, tag the user by username and they should get an alert (ex: hey /u/jschooltiger can you tell me more about ...)
Thanks!