Pergunta de entrevista da empresa Blue Origin

What is a lock in multi-threading programming?