Locks

How locks work? What is the locks difference?