Locking prevents the lost update problem, which occurs when two transactions read the same data and then overwrite each other's updates. By locking data before updating, one transaction waits for the other to complete, ensuring updates are applied sequentially. Deadlock (A) is a potential problem with locking, not a solution. Uncommitted dependency (C) and inconsistent data (D) are other concurrency issues that locking addresses.