A lock is a chamber with a gate at each end. A boat enters through the lower gate, the gate closes, and water is admitted from the upper reach until the level inside matches the level above. The upper gate then opens onto water that is now continuous with the chamber, and the boat leaves at the higher level.
Nothing pumps. The water arrives by gravity from the reach above, through paddles in the gate or through culverts in the chamber walls. Emptying works the same way in reverse, discharging downstream. A lock therefore spends water on every transit: roughly a lockful each time, drawn from the summit and lost to the sea.
That expenditure sets the shape of a canal. A summit level must be fed by reservoirs or pumping stations sized for the traffic, and a busy flight of locks can drain a summit faster than its catchment refills it. The Caen Hill flight at Devizes uses side ponds beside each lock, so part of the water emptied by one boat is held and reused rather than sent downstream.
The design is old, unglamorous and almost unchanged since the eighteenth century, because the constraint it solves has not changed either: a boat can only float on the water it is given, and water only runs downhill.