Pregunta de entrevista de Blue Origin

What is a lock in multi-threading programming?