AMD Interview Question

Tell me about what a lock does.