What a mutex is
A mutex gives exactly one thread at a time the right to execute a critical section — a region of code that touches shared mutable state. Acquire takes the right; release returns it. Between acquire and release, no other thread can hold the same mutex, so the section is effectively single-threaded. The atomic operation underneath is a compare-and-swap on the mutex's internal state; the scheduler intervenes only when a thread cannot acquire because the lock is held.