It's not just water, it applies to any fluid (liquid or gas).
This is known as Archimedes' Principle.