A group of friends from New Jersey, Jen Shaw, her boyfriend Darius, and couples Adam and Milla and Gary and Luis, travel to a small town in rural Virginia before hiking the Appalachian Trail. Several local residents, including a man named Nate, warn them against venturing off the marked trail. Jen briefly meets a strange woman, Edith, and a young mute girl, Ruthie, before the group begins their hike. Several hours into the trip, Gary is crushed and killed by a rolling tree trunk. Lost and distressed, the remaining friends set up camp for the night. The following day, the group discovers that Milla is missing as well as their cellphones. Nearby, they find a plaque dated 1859 commemorating the creation of a group of settlers in the mountains called the "Foundation" who believed the end of the United States was near.
While looking for Milla, Adam is caught in a trap. Shortly after, the group finds Adam restrained and being carried by two men donned in primitive clothing and wearing elk and deer skulls. After confronting the men, Adam escapes and kills the man with the elk skull. Moments later, Milla appears and reveals she was hiding after encountering the men earlier. The group attempts to flee but is surrounded by more mask-wearing men. While chasing after Adam, Milla falls into a pit and is impaled on sharpened tree branches. Adam abandons her before she is killed by an arrow shot by one of the masked men. The remaining group members - Jen, Adam, Darius, and Luis - are all captured.
The friends are taken to the group's primitive settlement deep in the forest, put before their court, and charged with murder. Jen recognizes Edith and Ruthie from the day before. The Foundation's leader, Venable, finds Adam guilty and sentences him to death while declaring Jen, Darius, and Luis guilty of lying and sentences them to "darkness". Venable then bludgeons Adam to death. Shortly after, Luis tries to flee, but Venable sears his eyes shut with a hot knife, blinding him. Jen begs Venable for mercy, claiming she and Darius would be helpful to them. Venable agrees, and both are welcomed into the community. Jen reluctantly seduces Venable.
Several weeks later, Jen's father, Scott Shaw, arrives in the nearby town to search for her and gets help from the motel owner. Scott pays a local tracker to take him through the forest. After the tracker and his son are killed by a trap, Scott finds the settlement but is surrounded. Jen, apparently brainwashed and married to Venable, shoots her father with an arrow. Venable sentences Scott to "darkness" for trespassing and imprisons him. That night, Jen sneaks away and releases her father, revealing that she only shot him so as not to raise suspicion. As Jen and Scott flee, Jen encounters Darius, but he refuses to leave. Jen then finds Ruthie, who helps them escape before Venable and several other cultists pursue them. On their way, Jen and Scott kill one of the cultists and discover the blinded, disheveled prisoners, including Luis, who Jen then shoots in the head out of mercy. Jen and Scott flee and kill multiple cultists, including Edith. They encounter Nate and other armed townsmen who offer help when cultists attack them, killing one of the townsmen and wounding Jen. They manage to escape, and Venable looks on as they drive away.
Several months later, Jen and her father have returned to their normal lives. Jen visits her stepmother at home but inside finds her welcoming Venable and Ruthie to the neighborhood. Jen confronts Venable, who notices that she is several months pregnant with his child and asks Jen to return with him to the Foundation. Jen reluctantly agrees on the condition that Venable never again interferes with her family. Jen, Venable, and Ruthie leave, driving away in a recreational vehicle (RV) with three other cultists. As the end credits roll, the RV swerves out of control and crashes into a parked car, presumably killing or incapacitating two of the cultists. Jen throws open the door and stabs Venable to death before hurling the knife at the other cultist, cutting him down before she proceeds to kill him. Jen holds Ruthie's hand as they walk back towards her family home.