Introverted Joel (Jim Carrey) and his kooky girlfriend Clementine (Kate Winslet) break up, and she impulsively visits Lacuna Inc., a memory-removal company. All her memories of Joel are deleted, so that, when they next meet, she has no idea who he is and he is puzzled at her ignoring him. Feeling rejected, Joel also visits Lacuna, to remove his memories of Clementine. However, during the process, he realises how important memories are, and mentally resists the erasure procedure.
Much of the film takes place inside Joel's head, as he fights to preserve the memory of Clementine before Lacuna can wipe it. The script, by Charlie Kaufman is, in this respect, similar to Kaufman's script for Being John Malkovich, which takes place largely inside Malkovich's head. Memory deletion is a science-fiction concept, though Eternal Sunshine could not really be described as a sci-fi film. The concept was used to disturbing effect at the end of OldBoy, though it was pioneered by novelist Philip K Dick.
Eternal Sunshine Of The Spotless Mind (directed by Michel Gondry) is one of a small group of films (alongside Memento, Fight Club, and others) singled out by David Bordwell for their narrative complexity. It shares with Pulp Fiction a non-linear narrative structure in which the time-frame jumps back-and-forth and key sequences are repeated. (Babel and The Fountain also employ these devices, though less successfully.)
Although Joel and Clementine both delete their memories of each other, they cannot control fate, so they are destined to meet each other again and fall back in love. Kaufman originally intended the film's ending to imply that the characters were locked in a cycle of meeting, separating, erasing, and meeting again. To me, though, it feels more optimistic, because although they recognise each other's faults (listening to Lacuna session tapes, recalling 'the list' in Friends), they are meant to be together.