AMD interview question

Tell me about what a lock does.