Click on each tree to turn it into water, without drowning any trees you haven't clicked on yet. A clicked tree becomes a river that extends in all four directions on the grid around it, and will block any other river from passing through it, allowing you to carefully protect unchanged trees with the very thing that would otherwise kill it.
If you've got a shovel, clicking on the ground will dig up a single square of the terrain, which will also prevent water from passing over it.