What are locks in a canal?

Can you answer this question?