A memory leak occurs when a computer program incorrectly manages memory allocations, causing a gradual loss of available memory and potentially leading to system slowdowns or crashes. It typically happens when allocated memory is not properly deallocated, leading to inefficient resource use and system instability over time.