Deadlock occurs when multiple processes are blocked waiting for resources held by other processes in the system, resulting in a cyclic dependency. There are four conditions required for deadlock: mutual exclusion, hold and wait, no preemption, and circular wait. An operating system can address deadlock through prevention, detection, or avoidance techniques. Prevention assigns resources in a way that deadlock cannot occur. Detection identifies when deadlock has occurred and resolves it. Avoidance dynamically analyzes resource allocation requests to determine if granting it could potentially lead to deadlock.