Refers to the mechanism that secures a door.
La cerradura de la puerta estaba rota, así que tuvimos que reemplazarla.
The lock on the door was broken, so we had to replace it.
La encerradura de la puerta se rompió y necesitamos un cerrajero para repararla.
The lock on the door broke, and we need a locksmith to fix it.