In a multi-threaded environment, multiple threads accessing and modifying shared resources can lead to inconsistent or incorrect data. This is known as a race condition.
Synchronization ensures controlled access to these resources so that only one thread can access the critical section at a time, preserving data consistency and thread safety.