A lock, or simply a gate, is a work of hydraulic engineering located within a dam between two waterways with different water levels. It is used to regulate the flow of water, but it can also allow the passage of water or vessels through a movable mechanism.
Over the years, different types and sizes of locks have been built.