A race condition is a situation in concurrent programming where the outcome of a program depends on the relative timing of events or operations. It occurs when multiple processes or threads access shared resources without proper synchronization, leading to an unpredictable and potentially erroneous behavior.