Locks were used to raise and lower boats to the next level along the canal by altering the level of the water.