As you play, your character will get thirsty. Thirsty players will start to get negative effects applied to them the longer they go without drinking.
You can go about 1 day without drinking before you start to get negative effects, starting with weakness and gradually introducing slowness, mining fatigue, nausea and poision effects before you die of dehydration after roughly 2 days of no water.
You will need to drink water bottles or any potion to replenish your thirst, but be warned - your bottle will break after 3 drinks. As such, you’ll want to make sure you get some glass fairly early on as you play.
The more thirsty you are, the more thirst your drink will replenish. However, if you aren’t particularly thirsty, the bottle you are drinking from may break earlier.
Note: Splash and lingering potions do not replenish thirst.