system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do boats allow propeller shafts to rotate while ensure water is not coming into the hull?

I image if the shaft can rotate, it means the connection to hull is not 100% sealed. If it is not sealed, then water can come into the boat. There has to be a part in the boat where the water is completely stopped from reaching but still allows shaft to rotate. How does it work?
gpt
There are various forms of devices called "shaft seals". The simplest means is that there is something called "packing" in the space between the rotating shaft and the stationary tube around it. The packing is often much like string, often with something like graphite dust or wax added, and then compressed into that open gap with something called a "packing gland". It's very much the same as how you can use a tap or bib for a garden hose without water shooting around from around the stem (the axle on which the handle rotates).

More complex seals will sometimes involve arrangements like a series of rubber barriers, each of which fit rather snugly around the shaft. This can allow in some leakage, but it's simply pumped back overboard.