This is a top view of the of the lock just before the bag is closed all the way.  The head is swung out of the way in this picture so you can see the cradle where the slider comes to rest.  The slider is the piece that slides along the zipper chain and has the zipper pull (tongue) attached.  If this slider was about 1 inch further the bag would be closed!  The lock head which holds the key would be swung over and pushed down (click) to lock.  When the lock head swings over and locks, it keeps the slider down inside this metal "cradle" and it does not allow the slider to move backwards in turn locking the bag until key is inserted and  bag is unlocked allowing the slider to be pulled up and back then move freely again to open.