The film opens with the voice of David Strine (Joshua Leonard) telling a woman that he loves seeing her in blue, as she was wearing that color when he first met her, and now he wants to feel the same way he did when he first met this woman.
Sawyer Valentini (Claire Foy) works as an over-the-phone salesperson somewhere in Pennsylvania. She thinks she sees David walking into her workplace, which frightens her. Sawyer lives alone and has one work friend named Jill (Sarah Stiles), but she regularly talks to her mother Angela (Amy Irving) who lives in Boston.
Sawyer goes on a Tinder date that night and straightforwardly tells her date that he will get what he wants, but after that, he is to never contact her again. Sawyer takes the guy to her apartment where they start to make out, but she has a panic attack and locks herself in the bathroom.
Sawyer visits a counselor at a facility called Highland Creek to discuss her issues. She was stalked by David for two years, and it left her unwell, with occasional thoughts of suicide. The counselor suggests that Sawyer sign up for extra counseling so that she may have someone to talk to about her issues.
After finishing the paperwork, Sawyer is unwillingly brought to a room where she has her belongings taken and is forced to undergo exams. Sawyer realizes she is being committed involuntarily for the next 24 hours. She attempts to call the police, only for the nurse to tell her that the cops get calls like that frequently.
Sawyer is brought to a room where she meets other patients like Nate Hoffman (Jay Pharoah) and Violet (Juno Temple), the latter who pesters Sawyer and threatens to cut her hair off while she sleeps with a shiv she made. Sawyer attempts to leave the room and is approached by a patient named Jacob (Raul Castillo). He tries to touch Sawyer, so she knees him in the groin. When the door opens, Sawyer sees an orderly that she thinks is David, so she slaps him before she is restrained and sedated. Meanwhile, police officers do arrive to the facility, but they leave before they find out about anything.
The next morning, Sawyer goes to see Dr. Hawthorne (Gibson Frazier), who tells her they are keeping her there for the whole week after her acts of violence against Jacob and the orderly.
Sawyer is forced to take medication for her outbursts. To her horror, one of the orderlies is David, using the name "George Shaw". She attempts to convince the others that David is not who he says he is, but this causes her to get restrained. When she sees David again later, he apologizes for potentially offending her while also showing her a piece of mail belonging to Angela.
Sawyer finds out that Nate has been keeping a cell phone and speaking to an unknown person on the other end. She convinces him to let him use it to contact her mother to let her know what's been going on. Angela travels all the way from Boston to confront Hawthorne and Highland's administrator, Ashley Brighterhouse (Aimee Mullins). Miss Brighterhouse insists that the work they are doing at Highland is impressive and that Sawyer can leave when she's all better. Angela vows to do everything in her power to get her daughter out.
Angela is staying at a motel when she gets a knock on the door from someone claiming to be a maintenance man. It's David.
Nate informs Sawyer that the practices at Highland Creek are basically an insurance scam, where they convince the insurance companies that the patient is unwell, allowing them to keep them there for extended periods of time. Nate says he is in there to kick an opioid addiction. As they become closer as friends, Sawyer tells Nate her history with David. She worked in a hospice for David's ailing father, who suffered from Alzheimer's. After he died, David began to harass Sawyer, claiming his father would have wanted them to be together. David would send countless texts and calls until Sawyer blocked him. It progressed to him sending her flowers at work and even breaking into her house to place a blue dress there. It got to the point where Sawyer filed a restraining order against David, as well as having an officer (Matt Damon) tell her what to do in order to make sure David can't find her.
Nate is later assaulted in the bathroom by David and taken to the basement where he tortures Nate and sends a picture to a phone that Sawyer acquired. She screams when she sees the picture and tries to tell the other orderlies, but they won't believe her. David later kills Nate by overdosing him with Fentanyl.
After more violent outbursts (including throwing coffee at Violet), Sawyer is sent to the basement and put in solitary confinement. She is visited by David, who is still delusional in thinking that Sawyer may still love him. He offers to take her to a cabin where they can be together. Sawyer then berates David and tears him down, calling him pathetic over his obsession with her and not finding anyone else to go after. This drives David to tears.
On the outside, a woman is jogging through the park with her dog when they come across a hand buried in the dirt. She calls the cops, and it is later revealed that the victim is the real George Shaw.
Back at Highland asylum, David brings Sawyer food and coffee. He once again tries to propose the cabin idea to her. She tells him to get another woman down there and have sex with her in front of Sawyer. David becomes uncomfortable with the idea until Sawyer suggests bringing Violet. He does so and nearly rapes Violet until Sawyer steps in. She pretends to act intimately toward Violet but is really just going for her shiv. Sawyer stabs David in the throat and makes her escape, leaving Violet in there. Sawyer watches as David snaps Violet's neck. Sawyer escapes from Highland but is quickly knocked out by David.
Sawyer wakes up in the trunk of David's car. She smells something foul and opens a bag next to her. She finds that it is Angela. Sawyer cries for her mother and takes her cross necklace. She manages to escape the trunk, but David stops the car and follows Sawyer into the woods. Meanwhile, the police return to Highland after ID-ing Shaw's body. Reporters arrive on the scene as well, and it is revealed that Nate was an inside man for a news team to do a report on the activities going on at Highland before he got killed. Still, Brighterhouse maintains that their practices are completely ethical. The police investigate the place and find sufficient evidence to arrest Brighterhouse.
David catches up to Sawyer in the woods and fractures her leg by whacking it with a hammer. He takes her unconscious body further into the woods. He lays down next to her and tries to talk to her lovingly. Sawyer turns out to be conscious, and she pulls out her mother's necklace and stabs David in the eye before going for the shiv again and slicing David's throat finally killing him.
Six months later.
Sawyer is having lunch with Jill, who mentions that Sawyer got a promotion. Sawyer then overhears a man having a conversation with a friend about a woman he loves. She believes it to be David, and she grabs a knife before approaching the man from behind. The man turns around, and Sawyer realizes it's not David. Horrified at what she was about to do, Sawyer runs out of the restaurant... now a full blossomed paranoid unsane person.