Barbara Covett (Judi Dench) teaches history at a comprehensive school in London. A lonely old spinster, Barbara's only "intimate relationship" is with herself by means of a diary. When a new, younger teacher Sheba Hart (Cate Blanchett) starts at the school, Barbara feels drawn to her and believes that she "may be the one." Barbara discovers that Sheba is having an affair with a student, Steven Connolly (Andrew Simpson), and confronts her. When Sheba asks her to not tell the school administration until Christmas so that she can be with her family, Barbara explains she has no intention of telling, as long as she ends the relationship. However, Sheba does not end the affair with Steven, causing Barbara to taunt her emotionally and draw her down, leading her to end the affair with Steven. In months passing, Barbara's grasp on Sheba slowly starts to take hold, with Barbara manipulating and emotionally blackmailing her, causing her attentions to be divided between her family and Barbara.
When Barbara's cat dies and Sheba's loyalties are easily divided, Sheba's husband Richard shouts in anger that her friend is being an evident pain and that his wife is being twisted by Barbara. With Barbara being left alone and angry, she seeks revenge by revealing Sheba's affair to a fellow teacher who comes to her asking her if Sheba is interested in him. The fellow teacher spreads the "playground rumour" to Steven's mother. Mrs Connolly then comes to Sheba's home and hits Sheba. Afterwards Sheba and her husband Richard bitterly argue. In Barbara's voiceover, she reveals she is glad that they are arguing, knowing that Sheba will come to her for comfort, which had been Barbara's plan to start with. The next day the media, as well as the school administration, are alerted, and Sheba's affair and her life are turned upside down by the collapse of her marriage, the destroyed relationship with her children, and the loss of her job. Barbara is fired from the school after denying to the headmaster that she knew of the relationship; he confronts her with a copy of a restraining order taken out against Barbara by another fellow teacher whom she had previously befriended.
Sheba ends up moving into Barbara's house, believing that the affair became known because Steven confessed it to his mother, but Sheba soon finds Barbara's diary and learns that it was Barbara who leaked the story of the affair, on account of the rather sexual attraction Barbara seems to have for her. When Barbara returns from a shopping round, she is confronted with a furiously angry Sheba, who strikes her in anger. Barbara says she has done her a favor by getting her out of a hopeless marriage. The two of them continue to shout and fight with one another, and Sheba claims that Barbara never really liked her, but in fact manipulated her for her own personal needs. Sheba runs outside with Barbara's journal, to streams of reporters and photographers. She shouts at them in a deluded fashion shouting that she is here, but eventually is hemmed in by a crush of reporters and photographers, at which point Barbara rescues her. Sheba's emotions spent, she quietly tells Barbara that she had initiated the friendship because she had liked her (Barbara) and they could have been friends. Barbara says she needs more than a friend, implying but not saying that she needs someone who is a close companion and lover. Sheba leaves Barbara, placing the journal on the table. Sheba returns to her family home. Richard answers the door. Sheba faces her husband with the silent questions "Can you forgive me? Can I come in?". Richard silently considers, and then allows her to enter.
Sheba is sentenced to 10 months, and the last scene is Barbara meeting another younger woman who is reading a newspaper reporting the Sheba Hart affair. Barbara says she used to know Sheba, but then says she didn't know her well. Barbara quickly introduces herself, and the other woman introduces herself as Annabelle. The pair continue to talk. Barbara mentions about attending a stage play, but then saying that she would much like a friendly companion to join her, which is implied to be Annabelle.