A deadlock occurs when two threads are waiting on a resource that the other has, causing an indefinite hang. These resources may be something like a Mutex, where a thread may be waiting for a Mutex to unlock.