[This](https://youtu.be/SBvclVcesEE) video does a fantastic job going over the workings of canal locks. To sum it up, you store water in one place, and let gravity and pumps use that water to lower or raise sections between locks. The whole point is that the water levels on either side of the canal are naturally uneven, so a direct water path would flood. So if you come in from the high side, they take you in at high level, close you off from the natural water, lower you down to the low level, then let you go on your way.
Latest Answers