Answer
A deadlock happens when two or more transactions each hold a lock that the other transaction needs, creating a cycle where neither can move forward, so SQL Server must step in and end one of them so the other can continue.
-- Transaction 1 locks Row A, then wants Row B
-- Transaction 2 locks Row B, then wants Row A
-- Neither can proceed, so this is a deadlockReal-world example Two warehouse update jobs run at the same time, each locking a different product row before trying to update the other one, causing SQL Server to cancel one of them automatically to break the cycle.