A lock is a mechanical fastening device that is released by a physical object such as a key.