system
Given the following post, respond as if you're commenting on Reddit:
human
How is fresh water created on remote islands surrounded by the salty ocean water? In other words how did ancient societies get enough drinking water in Oceania? Do the islands just have to be big enough?

I was just watching a video about the Mahjapahit(?) and they mentioned how a certain island was important for its drinking water. What does that mean? What process occurs to let some islands have fresh water?
gpt
Freshwater isn’t so much created as collected on islands.

The term you are looking for is “freshwater lens”.

Essentially, if conditions are right, rainwater can collect in the soil of an island and float on top of the more dense seawater far below in the soil.  

If this is a sustainable system, then everything is good.  People can drill down and tap into the freshwater, plants can grow and rainwater will periodically replenish the lens.

If the sea starts to intrude (violently or repeatedly) into the lens, then mixing occurs and problems start.  The freshwater becomes brackish (or completely mixes with the sea) and everything depending on freshwater is in trouble.