The canal device Leonardo da Vinci studied for moving boats between water levels was a canal lock.
A lock is an enclosed chamber with gates at both ends. To raise a boat, water enters the chamber until its level matches the higher stretch of canal; to lower it, water drains until the level matches the lower stretch. This lets vessels pass through a height difference without hauling them over land.
Leonardo worked on hydraulic engineering in Milan and studied canal improvements, including lock mechanisms. His notes and designs are associated with the development and refinement of miter gates, whose angled faces press together under water pressure. The Naviglio di San Marco in Milan is often connected with this engineering history.
Leonardo did not invent the basic idea of a lock. Earlier canals had used lock systems, including in China and Europe. His contribution was observation, analysis, and proposed improvements to hydraulic infrastructure rather than the creation of an entirely new principle.