In Exodus 15:25, what happened when a tree was thrown into the waters?

The waters were made sweet

And the people murmured against Moses, saying, What shall we drink?

And he cried unto the LORD; and the LORD shewed him a tree, which when he had cast into the waters, the waters were made sweet. Exodus 15:24-25